How can I draw a cube with a depth buffer in OpenGL ES 2.0?
-
09-10-2019 - |
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?
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