View Full Version : How can i activate antialiasing?

03-22-2007, 05:06 AM

how can i activate antialiasing┬┐

Im using glEnable(GL_POLYGON_SMOOTH); but nothing happens.

Maybe my graphic adapted doesnt support it?

03-22-2007, 05:20 AM
Have you enabled blending, glEnable(GL_BLEND)? It is probably a good idea to disable depth testing as well, glDisable(GL_DEPTH_TEST).

Otherwise post some kode if you want more help!

03-22-2007, 10:17 AM
For example, http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=46

03-22-2007, 11:23 AM
If you're trying to do regular polygon anti-aliasing then you also want to set the hint for the anti-aliasing. For polygons you would want something like glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST).

03-23-2007, 10:49 AM
Here are the steps as I do it:
1) draw transparent black quad
2) enable blending, with saturation for shared triangle edges
glEnable( GL_BLEND ) ;
3) draw main stuff
4) draw opaque white quad
However, it works only on Nvidia cards, doesn't work on ATi cards newer than 9250.

03-26-2007, 12:57 AM
thanks for your help, anyway, someone told me it if my graphic adapter doesnt support antialiasing, i wont get antialiasing, is it true?

03-26-2007, 01:29 AM
Yes it's true, but almost every card from known vendors that was produced during the last N years has antialiasing support. Let's clarify, do you speak about multisampling here?

03-26-2007, 04:52 AM
I have found some information about multisampling, but I dont know if that is my case or not....:-\

03-26-2007, 08:39 AM
As long as you use glEnable(GL_POLYGON_SMOOTH) you are trying to enable smooth AA (coverage-blending) for polygons. AFAIK it is supported by nVidia gaming hardware since GeForce4 (I had 4200, 5900, 6600GT and now 7900GTX). On ATI smooth AA for polygons didn't work for me on 9550 and X1300, if anyone knows otherwise please tell. Smooth AA for lines does work on ATI though.
From my experience on nVidia hardware smooth AA on polygons looks about the same quality as 8x MSAA. But since it has the drawback of polygon sorting (drawing order front to back, for proper usage of the saturation blend) I will change my stuff to use MSAA, since the new nVidia cards should support 16x MSAA.