I'm using OpenSceneGraph and Qt to develop a simulation software. Simulations can involve multiple bots in the same virtual world. My requirements for views are as follows:
- Ability to show static world cameras
- Ability to show bot cameras
- Ability to move these views around and/or stack them
To accomplish these tasks, I have made an 'OSGWidget' that uses an Osg Viewer to render the scene inside a QGLWidget. This OSGWidget is in turn put inside a QDockWidget that can be moved around and/or stacked, fulfilling that requirement.
The problem is that when using multiple singular viewers to render the same scene in different widgets, I get strange render behavior. Namely, textures do not display properly or sometimes even at all.
I have looked around SO and the OSG forums and while people have had similar problems, the only responses I have seen have suggested switching to an Osg CompositeViewer. For my purposes, I would like to avoid using that as it breaks my desired requirement of movable and stackable widgets rendering the same scene.
Is this an intractable situation that just isn't easily handled by Osg? I have seen several posts that say this is not how OSG is 'supposed to work' but they haven't really provided facts to support that claim. Has anyone done something similar or have any ideas/insight? I can provide code snippets if needed, but as this might just be a contradiction to Osg's ideology I will wait to get some responses.