enable hardware accelerated antialiasing

Is there a way to enable hardware accelerated antialiasing through the OpenGL API (or C++)?

**Not through the control panel in display settings.

ARB multisample is the way to do.

so can I just say…glEnable(GL_MULTISAMPLE_ARB) and presto AA is enabled? Or do I need to make other openGL calls?

I haven’t used them yet :smiley:

The best thing I can tell is to check the extension:

http://www.opengl.org/registry/specs/ARB/multisample.txt

And if I remember well you’ll have to ensure your window can support it too.

You need to build your pixel format with the appropriate multisample attributes, and then glEnable(GL_MULTISAMPLE_ARB).

Here’s how to do it on Mac OS X

On Windows you must create OpenGL’s rendering context through (WGL_ARB_pixel_format )
wglChoosePixelFormatARB / SetPixelFormat.
And you must specify
{WGL_SAMPLE_BUFFERS, TRUE}
{WGL_SAMPLES, samples_count} within integer attributes for wglChoosePixelFormatARB
Then use glEnable/glDisable with GL_MULTISAMPLE.
On NVIDIA you can use also GL_NV_multisample_filter_hint extension.