开发者

Best way to render Tesselated Objects (OpenGL)

开发者 https://www.devze.com 2023-01-02 14:52 出处:网络
I\'m using the GLUTesselator for Polygons. Right now the vertex callback does glvertex2f and gltex2f. Would it be better simply to collect the verticies from the vertex callback in a std:开发者_如何学

I'm using the GLUTesselator for Polygons. Right now the vertex callback does glvertex2f and gltex2f. Would it be better simply to collect the verticies from the vertex callback in a std:开发者_如何学C:vector then use gldrawarrays()? Or would this actually be less efficient since it has to put the verts and texture coordinates in a vector?

Thanks


If the vertex count on your tessellated objects is "sufficiently large" VAs/VBOs are almost always going to be faster than immediate-mode glBegin()/glEnd() code, especially if your geometry is static.

0

精彩评论

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