Easy, breezy, beautiful... Antialiasing...
My graphics card isn''t up to par. It supports GL_LINE_SMOOTH, but not GL_POLYGON_SMOOTH... I''ve seen several antialiasing tutorials that don''t work on my machine, so I figured out how to make the best of what I have.
use glBlendFunc(GL_SRC_ALPHA, GL_ONE) for blending, and you need only enable GL_LINE_SMOOTH. Keep depth testing enabled.
Draw your pretty polygons once as lines. This will obviously make them antialiased. Draw them a second time filled, and they''ll fill in all the areas inside the lines, which in turn make the edges antialiased.
There are drawbacks to this method. Firstly, I''ve tested this on a single square before writing this topic, so there is a slight chance your object MIGHT not look quite right. Secondly, my blending specs may not be the best to use... Mess with those and find out what works for you. Lastly, it''s not very speed-effective. Large scenes will draw VERY slowly by drawing every polygon twice, so use this only if you''ve a small scene or you want to render a picture.
Now, I''m off to play with it... Take care.
-Triangularium
Whoops... I was so excited, I got it backwards...
Draw the polygons filled first, then as antialiased lines...
Remember to have GL_CULL_FACE enabled to speed things up.
Draw the polygons filled first, then as antialiased lines...
Remember to have GL_CULL_FACE enabled to speed things up.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement