tags:

views:

41

answers:

1

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

+2  A: 

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)

zerm
I need it to be compatible with OGL 1.2
Milo
Then add such important information to the question so you can save me the trouble. 1.2 is, what, 20 years old?There is no other solution for this, as least not to my knowledge. "Pseudo-Instancing" using shaders might be interesting, though: http://http.download.nvidia.com/developer/SDK/Individual_Samples/DEMOS/OpenGL/src/glsl_pseudo_instancing/docs/glsl_pseudo_instancing.pdf
zerm
Actually 2.0 will do, i'ts > 2.0 that won't. Thanks
Milo
+1 to Pseudo Instancing using shaders.
Matias Valdenegro