Reputation: 61
If so, I can save the content of the FBO as an image file.
Other question: This image will have a resolution related with the screen? Or, it will have the same resolution as the input image that was texturized on the default framebuffer?
Was my question clear?
Upvotes: 0
Views: 1474
Reputation: 2455
Copying between framebuffers: glBlitFramebuffer
see here https://www.opengl.org/sdk/docs/man3/xhtml/glBlitFramebuffer.xml
This image will have a resolution related with the screen?
The resolution can be set in the glBlitFramebuffer
function. The default framebuffer has the size of your opengl window (can be different than the screen).
Is it possible to copy the default frambuffer to a framebuffer object without showing anything on the screen?
The image is usually first rendered offscreen and displayed when calling swapBuffers
(double buffering). So without calling swapBuffers
nothing is shown on the screen.
Keep in mind though, that you can render directly into framebuffers objects and you don't have to first render it into the default framebuffer and then copy it over. To do that just call glBindFramebuffer
before your actual draw calls.
Upvotes: 1