View Full Version : Texture question??

01-10-2002, 07:15 AM
Ok,this is what i want to know. Is it even possible to do the following.
I would like to load the number values from a bitmap. Then i would like to be able to manipulate the values individualy on the fly. For instance, If i have a wall thats textured with a brick bitmap. I would like to manipulate the color values of each individual pixel, to say Morph the image into another predefined image, through some simple time sequenced math. Basicaly an animated texture, exept more morphing from one to another, then simply moving around. Is it possible to load the values of the image into an array, and then load the array as a texture map?? If so, i could simply edit the array on the fly?? Also, i want to impose bump mapping features to the texture, even as it morphs. So once again can the bump map values be loaded into an array, and in turn edited?? Any info would be helpfull. Oh, i almost forgot, please no OS specific answers, i like open portablity. Thank you

01-10-2002, 08:58 AM
glTexSubImage2D is what you need. Create a texture as usual, keep a copy of it in system memory, manipulate that copy as you like, and update the texture with the function I mentioned.

01-10-2002, 09:14 AM
How exactly would i use that function?

01-11-2002, 01:22 AM
Go to MSDN (http://msdn.microsoft.com/) and search for glTexSubImage2D. That should be enough.

Just remember that that function does no create a texture, but it updates an existing texture.