Application controlled Anti-aliasing

The drivers always have an option for the application to control its own anti-aliasing settings.

Fine, but how do we control it from OpenGL? I know the GL_ARB_multisample extension, but this one appears not to have an option to specify 2x, 4x or more.

Do you know how to do an application controlled AA?

Thanks

You need to choose a pixelformat with the appropriate number of samples.
http://developer.nvidia.com/attach/6709

The NV_multisample_filter_hint extension also gives extra control over filtering modes:
http://www.nvidia.com/dev_content/nvopenglspecs/GL_NV_multisample_filter_hint.txt

-S.

Originally posted by vince:
[b]The drivers always have an option for the application to control its own anti-aliasing settings.

Fine, but how do we control it from OpenGL? I know the GL_ARB_multisample extension, but this one appears not to have an option to specify 2x, 4x or more.

Do you know how to do an application controlled AA?

Thanks[/b]

In the iAttribs of wglChoosePixelFormatARB() you set the value of WGL_SAMPLES_EXT(_ARB) to the number samples you wish to use (1,2,4,8,16…).

You can only do this during the creation of your window/rendering context. Once the window is created, you can enable/disable Multisampling using glEnable/glDisable and GL_MULTISAMPLE_ARB.

Cool, but when I create a list of possible buffers using wglGetPixelFormatAttribivARB, it returns I can have 0, 2, 4 or 8 multisamples. Can I really get 8? The NVidia driver only allows to go up to 4. I’d like much better to crank it up to 8.

Here is an extra question on the same topic.

For SimonGreen and rgpc intervention to work, I need to set the driver AA option to “application controlled”. Is there a way to query if this is set or not?

The AA option is almost certainly a registry setting that you could query. You just have to figure out where the setting is stored and which setting it is. Good luck! :smiley:

In reality though there’s little point in knowing. If a user has specified “Force AA to x” then that’s what they want. If they have selected “Application Controlled” then you can set what you want…