This post is simular to the Multisampling post I wrote a few days ago, but let me ask the question a different way:
Assume that I am setting the driver applet control pannel’s Antialiasing setting to Application Controled and I am using nVidia FX6800 Ultra with nVidia 66.93 driver version. In C++ and OpenGL and Win32, how can I specifically set the antialiasing mode to each of the following modes: 2x, 2xQ, 4x, etc…
I am using the MULTISAMPLE_ARB extension. With that extension, I can set the number of samples and it returns a pixel format. Some samples like 3 and 4 return the same pixel format. Also, how do you differentate 2x and 2xQ?
And is there documentation on this? I absolutely need to set this in the code and not through the driver control panel!
Since it seems no one is replying to that, here’s my hint. Take this with some care because it’s quite a bit of time I don’t play with this stuff anymore and I never considered FSAA too much.
So, the first thing I remember is win32 standard WGL won’t allow you to use multisampling. Period.
To access this functionality, you need an extension called WGL_ARB_pixel_format or something like.
Now, this is weird because you need a pixel format to have a render context so you get the extension fetched… then you have to destroy the RC and get another, which is not guaranteed to support the extension you checked. Luckly, I has been told this extension is more theorical problem and in practice, the pointer remains valid.
Then, you have to check for ARB_multisample. This tells you that ARB_p_f now understands new tokens, WGL_SAMPLE_BUFFERS_ARB, WGL_SAMPLES_ARB and more.
So, this is the only hint I can give you, sorry. I never went more deeply than that.
In case you find this useful, I would be glad to know more details on it.
To enable multisample, you need to initialize a standard OpenGL context in a window, looks for WGL_ARB_pixel_format, then initialize a new window (Yes, limitation of OpenGL in Windows, you can set a pixel format on a window only once ), then initialize with WGL_SAMPLE_BUFFERS_ARB set to GL_TRUE and WGL_SAMPLES_ARB set to the multisample level (if WGL_ARB_multisample is available of course).
To enable fast nVidia mode, use GL_NV_multisample_filter_hint extension.