Hi Robert, Am 22.10.2013 um 17:53 schrieb Robert Osfield <[email protected]>:
> It's a more complicated approach, but I'm not convinced it's cleaner. I'm > not sure what the cleanest approach is yet. :) > As this is a platform specific feature then perhaps naming the property with > a OSX prefix would be appropriate, if one doesn't make this explict in the > naming then doxygen docs could be added to make it clear that it only applies > to OSX. For parsing env var settings and command line args we already have > the osg::DisplaySettings object so would be inclined to be pragmatic and just > reuse this as you have already done. I am fine with renaming it to OSXMenuBarBehavior or something similar. > Putting controls in OSX specific Options objects would require P3D and other > applications to have a specific Cocoa code path that is #ifdef'd out for all > other platforms. I'd much prefer to avoid this. I think I did not make my approach clear enough: The idea is, that similar to DisplaySettings, the platform-specific GraphicsWindowingInterface::Options-object get the chance to read the env-vars and the command-line. So we can "encapsulate" the platform-specific parts into the corresponding implementation. We can extend the osg::GraphicsContext::setWindowingInterface to set up a default Options-object. And for "power-users" who deploy only for one platform, they can use the getter/setter provided by the Options-object w/o setting env-vars via code. Another approach: we can add readCommandLine-and readEnvironmentVariables-methods to GraphicsWindowingSystem and make them virtual and call them similar to osg::DisplaySettings. We'll loose the getters/setters via the options-menu though. There's some clunky code in GraphicsWindowCocoa, which sets application-specific state via the WindowData-class and this would benefit from the Options-opbject-approach. If you want to embed osg in a custom os-x class you don't want that the WindowingSystemInterface sets up a bare application with menubar etc. cheers, Stephan
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
