Trying to render a cube

Posts: 306
Joined: 2009.03
Post: #1
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
Everything seems to be just like the nehe tutorial. Does anyone know what might be causing this?
Quote this message in a reply
Posts: 3,591
Joined: 2003.06
Post: #2
Are you doing this on iPhone? If so, did you remember to attach a depth buffer when setting up your frame buffer?
Quote this message in a reply
Posts: 306
Joined: 2009.03
Post: #3
That was it. Thanks!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenGL Cube drawing: VBOs, instanced geometry, octrees Symbol$ 5 13,269 Dec 23, 2011 01:43 PM
Last Post: Skorche
  Help : Rubics Cube Iphone blueMac 4 4,609 Jun 24, 2009 10:29 AM
Last Post: MattDiamond
  Simple texture to Cube bmantzey 5 5,292 Oct 9, 2008 11:34 AM
Last Post: Lostlogic