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
how to force texture to update on the GPU (SOLVED)
-
roguetreasure
- Posts: 13
- Joined: Sun Feb 28, 2010 3:01 pm
- Location: Oklahoma
- Contact:
how to force texture to update on the GPU (SOLVED)
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
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
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:
My Bad. Thanks Blindside. It's working great after I fixed the code.
android apps and games http://www.roguetreasure.com