Thanks J-S, I had the same idea myself but unfortunately OpenGL drivers don't take thread or process priority into account. I made a simple test app that just renders thousands of quads, ran two instances simultaneously, set the process priority of one to high, and the priority of the other to idle, and they both ran at exactly the same frame rate - half the rate of one instance on its own.
Thanks for the suggestions Robert. I can't use spacial partitioning in my particular case as there's often a lot of overlapping geometry, but simply splitting the scene graph into many scene graphs with one bit of geometry in each sounds like it could be the way forward. Cheers! On 18 November 2010 19:04, Jean-Sébastien Guay < [email protected]> wrote: > 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 >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

