PDA

View Full Version : Seeing inside Skybox



Daisuke
12-12-2010, 11:46 AM
Hey I need help with displaying a skybox in your scene.

I created a absolute skybox using 6 textures however I am unable to see the textures if I am inside of the box. I can see the textures fine from the outside and I suspected that it may be a lighting issue however placing lights inside of the skybox was to no avail.

ZbuffeR
12-12-2010, 11:54 AM
For each quad (or triangle), reverse the order of vertices.
Ex. if it was vertex 1 then vertex 2 then vertex 3 ; you should use vertex 1 then 3 then 2.
Secondly, you should glDisable(GL_LIGHTING) before drawing skybox, and glEnable(GL_LIGHTING) after if needed.

Daisuke
12-12-2010, 12:24 PM
Thanks for the help. Looks like I defined my vertices in the incorrect order.

dukey
12-12-2010, 05:33 PM
for the lazy
2 sided lighting to the rescue

ZbuffeR
12-13-2010, 01:05 AM
Come on, never light a skybox !
Disabling lighting did not work ?