I´m looking for an easy way to query an OpenGL driver for the maximum supported value of WGL_SAMPLES_ARB.
This Value is used in the WGL_ARB_pixel_format extension to select the number of samples for doing Antialiasing.
The only way I see (and I dislike) is to query all available Pixelformats, that support AA and then manually search the maximum value.
It would be much cooler to be able to do (wouldn´t that be an idea g?):
glGetFloatv(GL_MAX_SAMPLES_ARB, &fMaxAASamples);
or
glGetFloatv(WGL_MAX_SAMPLES_ARB, &fMaxAASamples);
Anyone knows another (better) way?
By the way, if I´ve got a maximum number of 4 samples, is it sure, that I will be able to use / find a suitable Pixelformat, that has 2 samples, or can´t I assume this?
Even worse: I don’t mind querying all the formats but what I’m seeing is that wglChoosePixelFormatARB happily claims to find pixelformats regardless of what I specifiy for WGL_SAMPLES_ARB. Or is WGL_SAMPLES_ARB only checked when I call wglCreatePbufferARB ?
create a format with wglChoosePixelFormatARB
with WGL_SAMPLE_BUFFERS_ARB true, then query each of those with wglGetPixelFormatAttribivARB WGL_SAMPLES_ARB