I'm trying to make anti-aliasing work inside of OpenGL, here's what I've tried:


But so far none of these have worked.

I have gotten antialiasing to work by enabling it on the control panel for my video card (Catalyst Control Center in my case), but I would like to get it working inside my program instead.

  1. This is what the rendering looks like with 4x antialiasing enabled via the video card control panel:
  2. And this is what it looks like when I do it with my program:

AA working AA not working

How do I get antialiasing to work?

  • 2
    \$\begingroup\$ How about a screenshot of what you're getting, and what you are expecting to get? \$\endgroup\$ Aug 25, 2014 at 18:32
  • \$\begingroup\$ Also, what is CCC? \$\endgroup\$ Aug 25, 2014 at 18:33
  • 1
    \$\begingroup\$ CCC is the control panel for AMD graphics cards. (Catalyst Control Center IIRC) Here's a screenshot with AA on (by turning it on in CCC): imgur.com/xoPkJg8 Here's one without: imgur.com/wxf0dGs \$\endgroup\$
    – gie005
    Aug 25, 2014 at 19:00
  • 3
    \$\begingroup\$ You're trying to use rasterization antialiasing, which, although I've never used it, seems to be slow, and pretty much obsolete. You should probably use multisampling antialiasing instead. \$\endgroup\$ Aug 26, 2014 at 3:12

1 Answer 1


To get better results you will need to check for MSAA (http://www.opengl.org/wiki/Multisampling)

Define how many samples you want for Anti-Aliasing in WGL_SAMPLES_ARB attribute passed to the function wglChoosePixelFormatARB (for Windows).

You can find code for that here :


This paper is also worth reading for Anti-Aliasing :


  • \$\begingroup\$ Tried doing both, none had any effect sadly. \$\endgroup\$
    – gie005
    Aug 25, 2014 at 21:57
  • 1
    \$\begingroup\$ @gie005 If you can force-enable it through your GPU driver, you should be able to request it through OpenGL. Make sure you didn't force-disable it through CCC; AA Mode and AA Samples should be set to "Use application settings". If that's the case there's probably a problem with your context initialization code. \$\endgroup\$
    – bcrist
    Aug 26, 2014 at 4:44
  • \$\begingroup\$ Note that Nehe's tutorials are ancient (still made in the time of the fixed function pipeline) and though some (most) of the tricks still work there are usually different and better ways now. \$\endgroup\$
    – Roy T.
    Aug 26, 2014 at 8:13
  • \$\begingroup\$ @RoyT. is right about outdated NeHe tutorials. Code for various platforms is also provided in the first wiki link I gave. \$\endgroup\$ Aug 27, 2014 at 11:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .