Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我读过可以使用 vbo 并使用单个 drawelements 调用来绘制多个对象。我还没有找到任何这样的例子。现在我正在为每个绘制的立方体进行一次drawelements调用,这正在降低我的帧速率,因为我正在用它们制作整个游戏。任何帮助表示赞赏,尤其是示例代码。
是的,只需将所有数据放入一个长 VBO 中,然后glDrawElements()调用所有数据。尽管您可能无法使用任何GL_*_STRIP类型来绘制单独的对象。
glDrawElements()
GL_*_STRIP