如何在 OpenGL ES 2.0 中绘制带有深度缓冲区的立方体?

发布于 2024-10-06 21:52:22 字数 79 浏览 0 评论 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

把人绕傻吧 2024-10-13 21:52:22

作为最近课程的示例,我创建了一个示例应用程序,该应用程序使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文