Hi, I am using cube environment mapping using openGL extensions on my Geforce card according to the Nvidia examples.
I noticed that I cannot preload the cube’s textures and “bind” them to the cube later so that different objects have different cube environment maps but I must load the textures from scratch if I want to change the cube.
Is it possible to preload the textures and use glBindTexture later and if not how do I delete the cube’s textures from memory (so that I can load new ones) [or are they automatically replaced by the new ones in memory???]
Yes it is possible to pre-load them and just use glBindTexture. Make sure the target for bind texture is the Nvidia extension label for cube maps, not TEXTURE_2D.
The standard method for deleting textures should work fine (AFAIK). I have some sample source code for creating dynamic cube maps. If you want it mail me at RichardN@Climax.co.uk
I have tried both GL_TEXTURE_2D and the appropriate Nvidia extension but I get nothing. The only solution is to directly load the texture to memory and this is what nvidia does in the examples.
I understand what you mean Cass, but could you gimme some sample code? Should I use glBindTexture for the whole cube and if yes what parameters should I pass?
If you can post your email so that I can contact with you? [Maybe cass@nvidia.com???]
Yes, my email address is cass@nvidia.com, and there are some examples on the nvidia developer web site that illustrate using cubemap texture objects. I also have some c++ helper classes for cubemap objects in the glh library that is available with a number of the demos.