OpenGL: efficient way to render a batch of geometry?

后端 未结 2 944
野趣味
野趣味 2021-02-02 01:05

This is something I\'ve been looking into for while, but I have yet to find any concrete information or good examples. I have, say, a bunch of unconnected objects (triangle stri

2条回答
  •  太阳男子
    2021-02-02 01:56

    Look into glDrawElements(), it is one good way of achieving what you want. Note that performance might drop if your data changes each frame, since you then need to update the relevant portions of the data, which means copy them to the graphics card's memory. For static data, this is very fast.

提交回复
热议问题