开发者

Drawing filled circles as one vertex array using OpenGL?

开发者 https://www.devze.com 2023-01-03 16:20 出处:网络
Is there a way to draw many filled circles using one ve开发者_如何学Pythonrtex array. Is there a way to draw a circle with triangles? I basically have hundreds of circles far apart from each other tha

Is there a way to draw many filled circles using one ve开发者_如何学Pythonrtex array. Is there a way to draw a circle with triangles? I basically have hundreds of circles far apart from each other that need to be drawn but I feeling calling the vertex pointer for each circle is inefficient. I'd rather make 1 call for all circles if possible. Thanks


Take a look at Instancing, that is esp. GL_EXT_draw_instanced

For your convenience: http://www.opengl.org/registry/specs/EXT/draw_instanced.txt

(Note: This extension requires at least GeForce 8 series. As an EXT, it should be supported by ATI/Intel as well, but I do not know the requirements there - Probably hardware that supports at least OpenGL 2.0 and GL_EXT_gpu_shader4)

0

精彩评论

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