Hi,

I'm having a problem trying to use OSG for a specific scenario. My simulation 
contains several screens all showing the same scene at different angles (think 
projector setup). I'd like to synchronize the frames among them so that tearing 
between screens is minimal. Due to the nature of my scenes, some screens will 
have more to render than others and, as a result, take longer to render (ground 
vs sky). I'm looking for a way to interrupt a render loop and restart it if I 
detect it's taking too long for my liking.

I've looked at a few proposed solutions by others with a similar problem and 
I've found about the osg::State::setAbortRenderingPtr(bool*). That indeed 
cancels the current frame, but it causes the viewer to get locked up waiting 
for a mutex to become available in the Renderer::ThreadSafeQueue::takeFront() 
function called from the Renderer::draw() function.

I've tried setting the abortRenderPtr to NULL every frame (using the FRAME 
event on osgGA::GUIEventAdapter) and setting it to NULL immediately after it's 
been checked in RenderLeaf::render, though that doesn't seem to change 
anything. The "wait" function still takes control.

I've read that the setAbortRenderingPtr function is old, but is there any 
knowledge about how it's supposed to be used?

Also, if that doesn't seem like the solution for my scenario, does anyone have 
any suggestions?

Thanks!
- Ben
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to