jmasterx
jmasterx

Reputation: 54173

Drawing filled circles as one vertex array using OpenGL?

Is there a way to draw many filled circles using one vertex 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

Upvotes: 1

Views: 1222

Answers (1)

zerm
zerm

Reputation: 2852

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)

Upvotes: 2

Related Questions