How can i activate antialiasing?

Hi,

how can i activate antialiasing¿

Im using glEnable(GL_POLYGON_SMOOTH); but nothing happens.

Maybe my graphic adapted doesnt support it?

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!

For example, http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=46

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).

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 ) ;
    glBlendFunc( GL_SRC_ALPHA_SATURATE, GL_ONE ) ;
  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.

thanks for your help, anyway, someone told me it if my graphic adapter doesnt support antialiasing, i wont get antialiasing, is it true?

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?

I have found some information about multisampling, but I dont know if that is my case or not…:-\

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.