View Full Version : cube environment mapping
10-11-2000, 04:49 AM
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????]
Thanks in advance
10-11-2000, 04:54 AM
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
10-11-2000, 05:07 AM
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.
10-11-2000, 10:21 AM
It is most definitely possible to use glBindTexture for cubemaps. You've probably missed something in the code...
You can't "bind" a cubemap's images individually. You bind a cubemap texture object, and it restores all cube face images and all mipmap levels.
It sounds like you're thinking that each face is bound individually, which is definitely not the case.
Hope this helps - but if not, you can contact me offline.
10-11-2000, 01:10 PM
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 email@example.com????]
Yes, my email address is firstname.lastname@example.org, 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.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.