Hi all,

For screenshot and printing purpose, i am trying to change the background
color before the render pass and screenshot writing.

When i want to take a screenshot, i try to change the clear color with
camera->setClearColor(xxx) and set a flag at true to activate the screenshot
as camera final draw processing.
This change is done before osg::Viewer::frame() call so the glClearColor
call should be done after the setClearColor call. But the clear color change
is taken into account the next frame, so my screenshot is taken with the
wrong background color.

If i am not wrong, the call order is
*
- camera->setClearColor( anyColor )
- event handlers
- node callbacks
- pre camera draw callback
- rendering
- post camera draw callback ( screenshot taken here )
- camera->setClearColor( initial color )*

For some reasons i do not want to have to wait a new frame to take my
screenshot, so i am wondering if there is a way to force the background
color change instantly ?

Thank you for your attention,

Regards,
Harold
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to