如何在 OpenGL ES 2.0 中绘制带有深度缓冲区的立方体?
我一直尝试使用 OpenGL ES 2.0 和深度缓冲区绘制立方体,但没有成功。
有没有可用的示例可供我比较,看看我哪里出错了?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
作为最近课程的示例,我创建了一个示例应用程序,该应用程序使用 OpenGL ES 1.1 和 2.0 绘制纹理立方体,可以从 此处。不幸的是,该应用程序不使用深度缓冲区来进行任何操作。
我创建了一个更复杂的 OpenGL ES 2.0 应用程序,它使用了此处,因此您也许可以将代码从这个中提取到另一个中以完成您想要的任务。
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.