View Full Version : Attach back buffer to FBO

12-07-2008, 06:17 PM
I see that with OpenGL 3.0, one can draw to multiple render targets of different resolutions. I need to draw to the back buffer and also to a half-resolution other target, where the latter is used for simple color-coded picking, and I want to draw simultaneously to save on having to transform vertices twice. But how do I attach the back buffer as a render target to an FBO?

From NVIDIA's OpenGL 3.0 driver page: "Now allows rendering to a FBO with mixed-size attachments"

But if I do say
GLenum bufs[] = {GL_BACK, GL_AUX0};
glDrawBuffers(2, bufs)
how do I set the resolution for GL_AUX0?

06-01-2009, 10:09 AM

06-01-2009, 01:25 PM
You should read the spec for FBOs closer I think. They let you draw to renderbuffers and textures, not the main window's buffers.

06-02-2009, 06:03 AM
And fyi AUX buffers are deprecated in OpenGL 3.0...