PDA

View Full Version : FBO Multisample and glCopyTexSubImage2D()



PickleWorld
03-24-2010, 07:50 AM
If you have an FBO RenderBuffer set up with Multisampling (via glRenderbufferStorageMultisampleEXT()) can you use glCopyTexSubImage2D() to get the GPU to downsample the FBO into the texture (so you can use it)?

Or do you have to use glBlitFramebufferEXT() to blit the FBO into another FBO in order to downsample it before you can use it?

And next question, if you have to use glBlitFramebufferEXT()then can you blit directly into an FBO with an attached texture or do you have to blit into a standard RenderBuffer and then do a glReadPixels()?

arekkusu
03-24-2010, 11:24 AM
The error INVALID_OPERATION_EXT is generated if ReadPixels,
CopyPixels, CopyTex{Sub}Image*, CopyColor{Sub}Table, or
CopyConvolutionFilter* is called while READ_FRAMEBUFFER_BINDING_EXT
is non-zero, the read framebuffer is framebuffer complete, and the
value of SAMPLE_BUFFERS for the read framebuffer is greater than
zero.


You can blit directly to a texture, as long as you don't violate the limitations set in the spec.

PickleWorld
03-24-2010, 12:01 PM
Thanks.