i have a question regarding cubemaps. I have six images for a skybox. Now i want to load them into a cubemap for environmental mapping. However i also want to use these images to actually texture my skybox. And of course i don´t want to load the six images twice. So is it possible to disable the cubemap and instead use 2D texturing (but with the cubemap texture-object), to texture my skybox, as i would do it, if i had loaded the images seperatly as 2D textures?
Or is there a TexGen mode, with wich i could simply texture my skybox with the cubemap?
Try using GL_NORMAL_MAP_ARB as your texgen mode when drawing your skybox.
Personally I just keep each of the textures in their own texture object and texture each accordingly. You could try looking at some of the nVidia examples of reflection mapping to see what they do.
And no you cannot pass gl_texture2d to glEnable when you have a cubemap texture object. You could pass texture2d to glBind, instead of cube_map_ext, but you should use cube_map_ext.
Why would GL_NORMAL_MAP_ARB be used?
Miguel Castillo
[This message has been edited by mancha (edited 03-03-2003).]
I like Mancha’ solution with the Texgen and the planes. Very clean and efficient. (I’ll remember that one)
In one of the first cubemap demos of NVIDIA (the Bubble), they use a cubemap and then reload the whole thing as 6 separate textures for the skybox, which uses twice more memory.