Hi Michael,

As far as I can see to implement a solution I'll have to duplicate a lot
of code from RenderStage/RenderBin, unless you can see a more elegant
solution?

A simple way could be to run two viewers, each one from a loop running in a different thread? If there is a need to use textures or share resources between the two contexts you can set up sharing between two contexts running in two viewers just as easily as from two contexts running in the same viewer, it's just that you'll have to do synchronization yourself when you need to, because the two viewers will run in their threads independently.

Then you could set your principal viewer thread at a normal priority and the other viewer thread at a lower priority, so in theory the secondary rendering should not steal cycles from your main one, but would get the leftovers each frame (if any), so its rendering might go slower (if you're CPU-bound) but that seems OK for you as long as the main rendering goes at 60hz.

I don't know enough about your goal to be sure this will work for you, but it's one way to render two scene graphs at different rates.

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to