使用 VBO 时何时调用 glDisableClientState()
抱歉,我觉得这个问题有点无知,但我能找到的所有示例都只能从一个缓冲区中提取,所以我无法得到这个问题的答案。
哪个是正确的?
Enable Client States
Bind
Draw
Bind
Draw
Bind to 0
Disable Client States
或者
Bind
Enable Client States
Draw
Disable Client States
Bind
Enable Client States
Draw
Disable Client States
Bind to 0
其他什么?
简而言之,使用多个 vbo 进行多次绘制调用的正确顺序是什么?
Sorry for what feels like a bit of an ignorant question, but all the examples I can find only draw from one buffer, so I can't get an answer to this one.
Which is correct?
Enable Client States
Bind
Draw
Bind
Draw
Bind to 0
Disable Client States
or
Bind
Enable Client States
Draw
Disable Client States
Bind
Enable Client States
Draw
Disable Client States
Bind to 0
or something else?
In short, what is the correct order for making multiple draw calls with multiple vbos?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它们应该都可以工作,尽管第一个将涉及更少的 API 调用/状态更改。不过,在相关客户端启用之前,我对您的第二个绑定序列有点怀疑。
如果您在整个程序中使用相同的客户端状态,您可以在开始时启用它们并在整个过程中保持启用状态。
They should both work, though the first will involve fewer API calls/state changes. I'm a little leery in your second sequence of binding before the relevant client enable though.
If you're using the same client states throughout your program you can get by with enabling them at the start and leaving them enabled throughout.