开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜