PDA

View Full Version : Attach back buffer to FBO



Prune
12-07-2008, 07: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?

Prune
06-01-2009, 11:09 AM
Hello?

MalcolmB
06-01-2009, 02: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.

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