سؤال

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?

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top