Trying to render a cube
I am implementing the nehe tutorial for a cube. I have done these way back in java with no issue. I have done a ton of 2d already on the iphone. Doing this one I see all the sides of the cube but it seems to have the depth test backwards. That is things in the back render on top of things in the front. I have checked my depth test, and it is:
gl.glEnable(GL_DEPTH_TEST); //Enables Depth Testing
gl.glDepthFunc(GL_LEQUAL);
Everything seems to be just like the nehe tutorial. Does anyone know what might be causing this?
gl.glEnable(GL_DEPTH_TEST); //Enables Depth Testing
gl.glDepthFunc(GL_LEQUAL);
Everything seems to be just like the nehe tutorial. Does anyone know what might be causing this?
Are you doing this on iPhone? If so, did you remember to attach a depth buffer when setting up your frame buffer?
That was it. Thanks!
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenGL Cube drawing: VBOs, instanced geometry, octrees | Symbol$ | 5 | 6,028 |
Dec 23, 2011 01:43 PM Last Post: Skorche |
|
| Help : Rubics Cube Iphone | blueMac | 4 | 2,864 |
Jun 24, 2009 10:29 AM Last Post: MattDiamond |
|
| Simple texture to Cube | bmantzey | 5 | 3,226 |
Oct 9, 2008 11:34 AM Last Post: Lostlogic |
|

