I forget to mention in my last email. In my ponderings for a OpenSceneGraph 2.x the issue of how to manage per context data structures is something I have considered, and inclined to pull all per context data out of the scene graph and into a Context data structure, just like osg::State but containing a wider range of per context info.
This Context data structure would manage OpenGL objects such as display lists/texture objects/shader objects/program objects/state objects/frame buffer object handles rather than the indiviual elements in the scene graph. There would need to be a singleton to manage mapping between the scene graphs reference to these OpenGL objects, it could be a simple is just a int used as an index into the Context's local data, the key would be that each int would be unique for each scene graph element, but each Context would store the context specific value for it. Things like extensions would be registered with a extension singleton, and when contexts are built this would go to the extension singleton and instance a new extension structure for that context from its thread. It may be that I go for such a design before OpenSceneGraph 2.x. However, it won't be before 1.1.1 though ;-) For now I would just like a simple and reasonably robust solution, that does add undue overheads. Robert. _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
