Hi guys,

I am writing a wrapper for screen capturing logic. I used osgscreencapture 
example as a start, and it works.

However, I am experiencing strange bugs:

1. if you order the viewer to change the background color 
viewer.getCamera()->setClearColor(::osg::Vec4(1.0f, 0.0f, 0.0f, 1.0f);
and then call viewer.frame()
ther is a chance (not 100%!) that the screenshot will still have the old color. 
After you call viewer.frame() again, the screenshot has the new color.


2. If you first call viewer.setSceneData(NULL);
and then viewer.setSceneData(pNode); where pNode is a valid pointer to OSG 
scene,
you sometimes (again, not 100%!) still get an empty image (with no scene) if 
you call viewer.frame().


I suspect these bugs are related and show a more generic bug with threading. My 
guess would be that although .frame() call goes after the change to viewer's 
setting, somehow the frame() call uses old values.

I built up a small example which shows when these bugs appear by me.


Thank you!

Cheers,
Igor

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=34573#34573




Attachments: 
http://forum.openscenegraph.org//files/screencapture_threading_test_106.cpp


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

Reply via email to