如何在 3D 应用程序中定义和标准化单位?

发布于 2024-08-26 06:28:25 字数 163 浏览 3 评论 0原文

我开始为 Android 上的 OpenGL ES 1.1 应用程序设计对象图。

在实际绘制三角形并控制它们的大小时,什么是明智的?我是否应该将所有顶点存储在相对于彼此的单位中,然后将它们乘以我在绘制期间传递的值(GL10 gl)?

当进行视锥体剔除时,这种方法会产生任何影响吗?

I'm starting to design my object graph for an OpenGL ES 1.1 app on Android.

What's advisable when it comes to actually drawing my triangles and controlling their size? Should I store all the vertices in units relative to each other and then multiply them by a value I pass during a draw(GL10 gl)?

Would this approach have any impact when it comes time to do frustum culling?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

御弟哥哥 2024-09-02 06:28:25

当您完全控制所有模型/顶点数据时,您应该尝试以彼此正确的尺寸以及与您的设计概念相关的尺寸创建每个模型/顶点数据。因此,您不需要调用任何占用处理能力的 glScale 函数。从视锥体角度来看,无论您之前是否缩放都没有什么区别。通过缩放,您只需修改模型视图矩阵。

When you have full control over all your model/vertice data you shoul try to create each one in the correct size to each other and in relation to your design concept. Thereby you don't need to call any glScale functions which take up processing power. Frustum wise it doesn't make a difference whether you scaled before or not. By scaling you merely modify your modelview matrix.

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