Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is SingleThreaded the mandatory threading option? #100

Open
rickyviking opened this issue Jun 17, 2019 · 4 comments
Open

Is SingleThreaded the mandatory threading option? #100

rickyviking opened this issue Jun 17, 2019 · 4 comments
Labels

Comments

@rickyviking
Copy link
Contributor

Hi @bjornblissing,

the viewer example forces the osg threading model to SingleThreaded - see here.
Is this actually mandatory?
With CPU-bound scenes, using other schemes such as DrawThreadPerContext might help to improve the framerate.

@bjornblissing
Copy link
Owner

If I remember correctly the single threaded model is the model with the lowest latency. Other threading models may add another frame of latency, at least according to Robert's answer in this old thread:
http://forum.openscenegraph.org/viewtopic.php?p=62642#62642

However this might be an old and outdated truth.

@bjornblissing
Copy link
Owner

One way to test other threading models would be to use the Oculus Debug Tool to print some performance diagnostics and then changing between different threading models. For your application some other threading model might be more preferable compared to running single threaded.

https://developer.oculus.com/documentation/pcsdk/latest/concepts/dg-debug-tool/

@rickyviking
Copy link
Contributor Author

rickyviking commented Jun 18, 2019

Thank you, I will definitely give it a try and report back here!

Besides the latency, I was wandering if there were any other issue related to how fbo cameras are sent to the Oculus or similar sync problems, as the comment above the line which forces SingleThreaded states:
// Force single threaded to make sure that no other thread can use the GL context

@rickyviking
Copy link
Contributor Author

rickyviking commented Jul 19, 2019

Hi @bjornblissing
apparently there are no issues using other threading models - I've mostly used DrawThreadPerContext and investigating if/how much performance gain I get from that.

As a side question (we might open another issue if appropriate) I'd like to know what is the suggested way to add the osg stats (and possibly other HUDs) on top of the preview window.
Is there a clean way to render those cameras after blitting the texture from Oculus to the preview window?

@bjornblissing bjornblissing changed the title osg threading model Is SingleThreaded the mandatory threading option? Jan 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants