Problem with Rotating cube....

I’m obviously a beginner in OpenGL…

I’ve made a cube in OpenGL, and then I made it spin. It works fine, except it looks like you can only see the inside of the cube. There are somefaces that are always redrawn, and some faces that disappear if there is a face in front of it. Is there an OpenGL command to always show the faces nearest you? Is there something else that I’m not doing? Any help would be much appreciated.

-Michael S. Rehse

Without seening your code can not say what is happing…

This website: nehe.gamedev.net has good openGL tutors, and one is on a spinning cube. It will give you help on writting openGL programs.

Originally posted by rehseboy:
[b]I’m obviously a beginner in OpenGL…

I’ve made a cube in OpenGL, and then I made it spin. It works fine, except it looks like you can only see the inside of the cube. There are somefaces that are always redrawn, and some faces that disappear if there is a face in front of it. Is there an OpenGL command to always show the faces nearest you? Is there something else that I’m not doing? Any help would be much appreciated.

-Michael S. Rehse[/b]

I think You didn’t enable depth testing.
Put this line at the beginning of rendering code or in some initialization funtcion:

glEnable(GL_DEPTH_TEST);

that should help I think

cheers,
yaro