Restored the REGISTER_WINDOWINGSYSTEMINTERFACE macro to the include/osg/GraphicsContext header and removed the OSGVIEWER_EXPORT as this was causing compatibility issues with osgQt.

In GraphicsWindowWin32 replaced REGISTER_WINDOWINGSYSTEMINTERFACE usage with locally implemented equivilant with the required OSGVIEWER_EXPORT.
This commit is contained in:
Robert Osfield
2018-05-21 13:10:40 +01:00
parent 43058ac1d5
commit dce6684c59
3 changed files with 7 additions and 13 deletions

View File

@@ -597,6 +597,10 @@ struct WindowingSystemInterfaceProxy
osg::ref_ptr<T> _wsi;
};
#define REGISTER_WINDOWINGSYSTEMINTERFACE(ext, classname) \
extern "C" void graphicswindow_##ext(void) {} \
static osg::WindowingSystemInterfaceProxy<classname> s_proxy_##classname(#ext);
}
#endif

View File

@@ -274,10 +274,6 @@ class GraphicsWindowEmbedded : public GraphicsWindow
};
#define REGISTER_WINDOWINGSYSTEMINTERFACE(ext, classname) \
extern "C" OSGVIEWER_EXPORT void graphicswindow_##ext(void) {} \
static osg::WindowingSystemInterfaceProxy<classname> s_proxy_##classname(#ext);
struct GraphicsWindowFunctionProxy
{
GraphicsWindowFunctionProxy(CGraphicsWindowFunction function) { (function)(); }

View File

@@ -3147,15 +3147,9 @@ static RegisterWindowingSystemInterfaceProxy createWindowingSystemInterfaceProxy
} // namespace OsgViewer
#if 1
REGISTER_WINDOWINGSYSTEMINTERFACE(Win32, Win32WindowingSystem)
#else
// declare C entry point for static compilation.
extern "C" void OSGVIEWER_EXPORT graphicswindow_Win32(void)
{
osg::GraphicsContext::setWindowingSystemInterface(osgViewer::Win32WindowingSystem::getInterface());
}
#endif
extern "C" OSGVIEWER_EXPORT void graphicswindow_Win32(void) {}
static osg::WindowingSystemInterfaceProxy<Win32WindowingSystem> s_proxy_Win32WindowingSystem("Win32");
void GraphicsWindowWin32::raiseWindow()
{