Hi, On Thursday, September 19, 2013 15:20:15 Robert Osfield wrote: > I don't believe it's necessary to initialize all extensions together as if > you do have code paths/scene graph subgraph selection that is dependent on > extension/version presence it'll be for specific extensions/versions, as > you could initialize the ones of interest for you application within a > Viewer Realizer operation, see osgvolume for an example of this. So > without any changes to the OSG can achieve what you want with a little bit > of coding. > > Initializing all extension on realize is no bad thing though, one would > need to have a registry of extension objects and have a proxy object for > each one to register itself with the extension registry. One could then > get the extension supported by calling the registry. However, this type of > scheme would add extra complexity, and increase the footprint of the OSG in > memory and the speed of initialize as you'd need to register all extensions > even the ones that you application doesn't need.
I agree with both of you. I wish osg offers the information what is present way earlier. But I also see your concerns Robert. I could imagine to have a bool flag in the context traits that determines if this initialization happens early or not? And yes this would require a kind of registry then. Which would be an other static global variable that every now and then provides problems with initialization and destruction orders ... Greetings Mathias _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

