Best anti-aliasing for drawing 2D polygons with OpenGL

I'm new to OpenGL so I beg your pardon.


For performance reasons, I'd like to use OpenGL to render a 2D drawing consisting of simple geometric shapes (like triangles, quads etc) filled with simple color. There are no textures, no lines, no light, no fog, no third dimension etc.


I have been able to build the picture already, however the quality of the image is notably poor. The edges of the polygons appear jagged.


I've tried to use multi-sampling anti-aliasing in NSOpenGLView, and even though it worked, the edges of polygons still look "dirty" compared to what I get with the standard Quartz drawing routines. (BTW, super-sampling in NSOpenGLView gives exactly the same result as multi-sampling, not sure why)


I've studied what other techniques exist for anti-aliasing with OpenGL, and found things like FSAA, FXAA, SMAA, GBAA, GPAA etc. Apart from my lack of knowledge in area of shaders, all these techniques look like a huge overkill for such a basic task like drawing colored 2D polygons.


It seems mind-boggling that such a simple task as bilinear interpolation of pixels for geometric 2D anti-aliasing does not exist on OpenGL. Or am I missing something?


I'd appreciate some pointers, thanks!

No, you are not missing anything.

It's not a trivial task.


Here is for example some technics

https://www.mapbox.com/blog/drawing-antialiased-lines/

Best anti-aliasing for drawing 2D polygons with OpenGL
 
 
Q