Hi folks,
In commit fe6238, a macro was added to osg/GraphicsContext:
Code:
#define REGISTER_WINDOWINGSYSTEMINTERFACE(ext, classname) \
extern "C" void graphicswindow_##ext(void) {} \
static osg::WindowingSystemInterfaceProxy s_proxy_##classname(#ext);
This unfortunately doesn’t quite work as intended in some of the
osgViewer/GraphicsWindow* implementation classes:
GraphicsWindowCocoa.mm,
GraphicsWindowIOS.mm,
GraphicsWindowCarbon.cpp
For example in GraphicsWindowCocoa, the macro is invoked as follows:
Code:
REGISTER_WINDOWINGSYSTEMINTERFACE(Cocoa,
osgViewer::CocoaWindowingSystemInterface)
However the "osgViewer::CocoaWindowingSystemInterface” is viewed as 3 separate
tokens by the preprocessor, and so replaces “##classname” with only “osg”.
Here is a proposed work-around:
Code:
#define REGISTER_WINDOWINGSYSTEMINTERFACE(ext, ns, classname) \
extern "C" void graphicswindow_##ext(void) {} \
static osg::WindowingSystemInterfaceProxy
s_proxy_##classname(#ext);
…
Code:
REGISTER_WINDOWINGSYSTEMINTERFACE(Cocoa, osgViewer,
CocoaWindowingSystemInterface)
regards,
John
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67147#67147
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org