[osg-users] Draw thread per opengl context instead of per GraphicsContext
Ben Meijering
bmeijering at tree-c.nl
Mon Nov 13 03:50:06 PST 2017
Hi Robert,
Ah ok, so the GraphicsContext::Traits::sharedContext doesn't share the actual context, but allows object sharing between contexts.
Thanks for clearing that up for me, I think this changes what I am looking for.
The reason that I am looking into this, is because of the following measurements.
In all tests, the screenspace view sizes and rendered objects are the same.
1. 6 views in one window (singlethreaded) 24.3 fps
2. 6 views in one window (multithreaded) 46 fps
In these two tests, we have 1 context and 1 draw thread.
Enabling multithreading almost doubles the performance.
So, performing culling on another thread proves to be very effective.
3. 6 views in separate windows (multithreaded) 11.7 fps
4. 6 views in separate windows with context sharing (singlethreaded) 22 fps
The last test cannot be done with multiple render threads, which makes sense.
But I think (please correct me if I'm wrong), multiple separate cull threads should have no effect on it's correct operation.
Looking at the performance difference between test 1 and 2, I am eager to see what culling on a different thread(s) would do here.
So my question changes to: for test 4, is it possible to still use separate cull threads while we only use 1 draw thread.
And if not, could you give us pointers on what should be taken into consideration if we want to implement this.
Thanks!
Cheers,
Ben
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72376#72376
More information about the osg-users
mailing list