I am currently working on a video application. The rendered data on the graphic card is loaded to a video card (a dedicated hardware for video input/output) to put SDI signals out. To achieve independent video output, the scene is rendered offscreen.
For pre-viewing I want to see the rendered scene on my computer display as well.
The necessary data flow is as follows:
render scene (offscreen) -> Load into System RAM -> copy to the video card -> output SDI signal
This works fine in a test environment with pbuffers. Because the “right” renderer uses fbos I want to use for offscreen renderig as well.
I found several tutorials for rendering fbos offscreen to a texture and use this texture for onscreen use, but I am confused how I get the offscreen data on my computer screen.
Is it possible to render in a fbo offscreen and copy the data in system RAM (to process to my video card)
Is it necessary to re-render the created texture onscreen or is it possible to copy the data from offscreen graphic ram to the backbuffer of the “normal” framebuffer?
If it is not, have I use to render offscreen into a texture and map it on a onscreen quad and render again, or which technique is prefered ?
Technically, using FBO’s is same as using pbuffers or the windows framebuffer: you can use ReadPixel, WritePixels and CopyPixel as much as you wish. With the GL_EXT_framebuffer_blit extension, it is possible to copy the contents of a framebuffer directly to a window (or another framebuffer), but this extension is only supported by Nvidia. The best (most platform-friendly) way would be to render a texture and map it on a fullscreen quad.
I guess, yes. I haven’t use it myself, so I can’t tell anything more concrete (I haven’t programmed 3D for several years now, but I am going to start again soon
No one can give you information about the blit extension, because it is very new. I thought the the spec has some examples at the end of the document? It seems pretty straightforward to me, you just set your offscreen FBO as the read FBO and your windows as the write FBO and then call either CopyPixels or the blit function…
p.s. try it yourself and tell us the results
p.p.s. The blit extension is only present on nvidia cards starting with GFFX and latest 97.46 (or such) drivers…