开发者

How to draw multiple objects using a VBO and a single OpenGL drawelements call?

开发者 https://www.devze.com 2023-01-17 09:32 出处:网络
I\'ve read that it is possible to draw multiple objects using a vbo and using single drawelements call.I haven\'t found any examples of this.Right now I\'m making a drawelements call 开发者_StackOverf

I've read that it is possible to draw multiple objects using a vbo and using single drawelements call. I haven't found any examples of this. Right now I'm making a drawelements call 开发者_StackOverflow社区per cube drawn which is killing my frame rate since I'm making the entire game out of them. Any help is appreciated, especially example code.


Yes, just put all your data into one long VBO and then make the glDrawElements() call on all of it. Though you probably won't be able to use any of the GL_*_STRIP types for drawing separate objects.

0

精彩评论

暂无评论...
验证码 换一张
取 消