I created a box with flipped normals so that I can see into the box but not past it. I.E The box has transparent faces on the outside and opaque on the inside. This worked fine, however after I load a file (nothing to do with openGL) the box faces suddenly become opaque on both sides. :eek:
What happened And how do I make sure that this stops hapening? Any ideas??
i’m not sure exactly what you did but keep in mind that normals are used for lighting, not for visibility. The “inside” faces of the box will still be drawn even if you are looking at them from the outside. The effect you want could be achieved by using glCullFace, if you are already doing this, feel free to call me an idiot.
As chowe said, you will need to enable face culling with glEnable(GL_CULL_FACE) and glCullFace to set either front or back face culling. The front face is determined by the winding order, not the direction of the normals. You can specify if the winding order should be clockwise or counter clockwise by using glFrontFace. By default, the front face is the side in which the vertices are specified in a counter clockwise order when you are looking at it.