Drawing circle primitives using GL_POINTS in GLSL

Drawing circle primitives using GL_POINTS in GLSL

One of the best things that I love in openGL due to performance is to draw using GL_POINTS instead standard triangles or lines, because it’s an ideal primitive for debug purposes or 3d geometry editor (I think that it’s more easy than GL_POINT_SPRITES to show all vertices in our geometry, for example).

But the lack is that you’re only allowed to paint ugly scaled quads :S. Using the programmable pipeline you can paint any shape that you want. I upload 2 shaders for paint circles in GLSL using GL_POINTS.

circles_with_gl_points.vert
circles_with_gl_points.frag

Author Bio

Leave a reply

Current day month ye@r *