Question

I've been trying to draw a cube without success using OpenGL ES 2.0 and a depth buffer.

Are there any examples of this available that I could compare against to see where I'm going wrong?

Was it helpful?

Solution

As an example for a recent class, I created a sample application that draws a textured cube using both OpenGL ES 1.1 and 2.0, which can be downloaded from here. Unfortunately, that application does not use a depth buffer for anything.

I created a more complex OpenGL ES 2.0 application that does use one here, so you might be able to pull code from this one into the other to accomplish what you want.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top