Hi J-S,
Jean-Sébastien Guay wrote:
Hi JP,
is it possible to let OSG render a bunch of FBO cameras without the
main camera rendering and calling swapbuffers? If so, how do I disable
the main camera for a few OSG frame() calls?
You can have a whole bunch of prerender RTT cameras in you scene graph,
and they will all render before the main camera renders. Only the main
camera will call swapbuffers, so only that one will cause a vsync. Is
that what you want?
No, I have many examples of this case running, where the graph is known
before the time. I'm looking for a way to render a graph where the
number of RTT steps might be dynamic and unknown for a single external
"frame". Imagine an iterative optimisation or search stage in an algorithm.
If not, you can change the main camera's graphics context to a pbuffer
instead of a GraphicsWindowWin32/X11/Carbon, and then all frames will be
rendered offscreen. You can then remove all children from your main
scene except for your RTT cameras, and only they will render anything
(the main camera will still glClear(), you can disable that too by
setting the clear mask to 0 on the graphics context/camera). Then when
you're ready, switch to a non-pbuffer graphics context again, put back
whatever you had in your scene, and it will start rendering, thus
swapbuffers, thus vsync.
Thanks, I'm going to try this.
rgds
jp
Hope this helps,
J-S
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org