0

When I render my scene to the screen, the scene uses a _MultiSampling Anti-Aliasing 8x; it's ok.

But I want to read to the pixel buffers through glReadPixels(), I have a Aliased-Image with Aliased lines. It doesn't use the 8x MSAA.

Code:

glReadPixels(0,0, w, h, GL_BGRA_EXT, GL_UNSIGNED_BYTE, (void*)pixels);

How do I access to the pixels buffer with the MSAA transformation (filter)?

glReadPixels doesn't have a special parameter.

Side Note: I would like to use the Opengl 1

Important Note: I use Qt 5.9's QOpenGLWidget class

Rabbid76
  • 202,892
  • 27
  • 131
  • 174
J. S.
  • 51
  • 4

1 Answers1

1

I take it that you're rendering to an off-screen renderbuffer or texture via FBO. The solution is to create a renderbuffer that uses a MSAA pixelformat. Antialiasing is not a postprocessing filter! (at least not in the form MSAA implements it).

datenwolf
  • 159,371
  • 13
  • 185
  • 298