PDA

View Full Version : glDisable(GL_MULTISAMPLE) has no effect?



JoshKlint
09-05-2010, 10:43 AM
Now that I have a multisampled pixel format created, calling glDisable(GL_MULTISAMPLE) seems to have no effect. I can't turn off the antialiasing. This is in OpenGL 3.1. Has behavior changed, or is this a known issue?

GEForce 9800 GTX, Windows 7 64-bit.

kyle_
09-05-2010, 11:11 AM
I have observed similar behavior on NV with FBO with high samplecounts. Dunno about def-FBO though.

JoshKlint
09-05-2010, 04:20 PM
Reported here, along with an example:
http://developer.nvidia.com/forums/index.php?showtopic=5088

Dark Photon
09-06-2010, 08:10 AM
Now that I have a multisampled pixel format created, calling glDisable(GL_MULTISAMPLE) seems to have no effect. I can't turn off the antialiasing. This is in OpenGL 3.1. Has behavior changed, or is this a known issue?
There are several related subissues here. Multisample render target, multisample rasterization, and multisample reconstruction filter. When I looked at this before, it appears glDisable( GL_MULTISAMPLE ) only (as the spec says) disables multisample rasterization. So you get rid of some of the AA effect but not necessarily all, so long as you keep the MSAA pixel format. See the attached pic.

But it's been years since I took this screenshot. Don't know what the current drivers do.

If you don't want AA, use an FBO to draw to a single-sample target. Alternatively, implementing your own downsampling technique might get rid of the residual AA left over after glDisable( GL_MULTISAMPLE ). Or picking another vendor-provided MSAA mode where the reconstruction filter doesn't cross pixel boundaries (vendor/driver-specific voodoo).

JoshKlint
09-19-2010, 12:15 AM
If the spec specifies behavior other than what I described as my expectation, then I am not concerned about this.

david_f_knight
09-19-2010, 10:49 AM
This is very interesting, and very significant in the case of picking objects by color ID. In my case, I have never observed this behavior, i.e., when I call glDisable(GL_MULTISAMPLE), there is no anti-aliasing of any kind going on at all. I have an AMD/ATI Radeon HD 5750, and I've installed each of the drivers that have supported OpenGL 4.0 (10.3 beta, 10.6, 10.7, 10.8, and 10.9), Windows XP 32 bit. I have only tested this with OpenGL 4.0 core profile.