how to force texture to update on the GPU (SOLVED)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
roguetreasure
Posts: 13
Joined: Sun Feb 28, 2010 3:01 pm
Location: Oklahoma
Contact:

how to force texture to update on the GPU (SOLVED)

Post by roguetreasure »

Sorry I could not find this answer. I did search and found setDirty to force the VBO to update but that doesnt seam to apply in this situation.

I am writing a game in which comets are used to destroy a planet. When the comet impacts I get the planet texture with something like
irr::video::ITexture * poTexture = m_poSceneNode->getMaterial(0).getTexture(0);
then I use the lock texture with poTexture->lock(); and directly draw a crater on the texture. This appears to work except that the change to the texture is not visible. I assume I need something equivilent to setDirty() to force the texture to be updated on the gpu.

I do not want to use decals for this situation because there will be hundreds of decals required before the planet is considered "destroyed"

Please Help.
Thank you
Last edited by roguetreasure on Sat Jun 05, 2010 4:44 am, edited 1 time in total.
android apps and games http://www.roguetreasure.com
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

It will update when you unlock() it.
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
roguetreasure
Posts: 13
Joined: Sun Feb 28, 2010 3:01 pm
Location: Oklahoma
Contact:

Post by roguetreasure »

My Bad. Thanks Blindside. It's working great after I fixed the code.
android apps and games http://www.roguetreasure.com
Post Reply