Modifying translucency of a texture on the fly
by Keith Johnston · in Torque Game Engine · 01/01/2004 (6:39 pm) · 3 replies
I'd like to be able to modify the translucency of a texture after the game has loaded. Any pointers on how I might do this? I've briefly looked at the texture manager and didn't see an easy way to do it - it looks like I might have to modify libpng.
Keith
Keith
#2
It depends if you want the whole bitmap to change alpha or just part of it.
01/01/2004 (9:44 pm)
Or get a handle to the texture (this will be a GBitmap*) and start tweaking stuff. Might be a trick to get it to reupload the changes to the video card, but the basic idea is simple.It depends if you want the whole bitmap to change alpha or just part of it.
#3
01/01/2004 (11:21 pm)
Thanks for the tips - looks like the easiest way is to modify the bits in GBitmap and get TextureManager to refresh the texture. I didn't see that GBitmap had all the image data in it.
Torque Owner Mz