PDA

View Full Version : disabling AA with glRenderbufferStorageMultisample



Justin Whear
02-25-2010, 05:49 PM
I'm using an FBO with a multisample renderbuffer to draw elements of my scene. I then use glBlitFramebufferEXT to copy the results to an FBO with a texture bound. This has the effect of drawing to texture but with anti-aliasing. This all works great.
My problem is that I want to occasionally draw lines which are only 1 pixel thick. To do this, I thought I could simply call glDisable(GL_LINE_SMOOTH)--but this seems to have no effect. I still get an anti-aliased line. Is this the expected behavior or should disabling line smoothing have the same effect as it would have if I were simply rendering straight to the backbuffer?

Alfonse Reinheart
02-25-2010, 06:57 PM
glDisable(GL_LINE_SMOOTH)

I'm pretty sure line smoothing doesn't work with multisample activated.

If you want to turn off multisampling, simply glDisable(GL_MULTISAMPLE). This will cause all writes to a multisample buffer to write a single sample to all samples of that pixel.

Justin Whear
02-26-2010, 10:13 AM
+1 internets to you, sir. This is exactly what I needed.