Merge pull request #595 from cxw42/cygx11

Remove duplication of REGISTER_WINDOWINGSYSTEMINTERFACE code in GraphicsWindowWin32
This commit is contained in:
OpenSceneGraph git repository 2018-08-16 15:46:56 +01:00 committed by GitHub
commit 1b4677c98a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View File

@ -597,10 +597,15 @@ struct WindowingSystemInterfaceProxy
osg::ref_ptr<T> _wsi;
};
#define REGISTER_WINDOWINGSYSTEMINTERFACE(ext, classname) \
extern "C" void graphicswindow_##ext(void) {} \
// Internal use only - compile on C90 compilers, which prohibit empty macro arguments.
#define _OSG_GRAPHICSCONTEXT_NO_ATTRIBS
#define REGISTER_WINDOWINGSYSTEMINTERFACE2(ext, classname, attribs) \
extern "C" attribs void graphicswindow_##ext(void) {} \
static osg::WindowingSystemInterfaceProxy<classname> s_proxy_##classname(#ext);
#define REGISTER_WINDOWINGSYSTEMINTERFACE(ext, classname) \
REGISTER_WINDOWINGSYSTEMINTERFACE2(ext, classname, _OSG_GRAPHICSCONTEXT_NO_ATTRIBS)
}
#endif

View File

@ -3148,8 +3148,7 @@ static RegisterWindowingSystemInterfaceProxy createWindowingSystemInterfaceProxy
} // namespace OsgViewer
extern "C" OSGVIEWER_EXPORT void graphicswindow_Win32(void) {}
static osg::WindowingSystemInterfaceProxy<Win32WindowingSystem> s_proxy_Win32WindowingSystem("Win32");
REGISTER_WINDOWINGSYSTEMINTERFACE2(Win32,Win32WindowingSystem,OSGVIEWER_EXPORT)
void GraphicsWindowWin32::raiseWindow()
{

View File

@ -2277,7 +2277,7 @@ public:
};
REGISTER_WINDOWINGSYSTEMINTERFACE(X11, X11WindowingSystemInterface)
REGISTER_WINDOWINGSYSTEMINTERFACE2(X11, X11WindowingSystemInterface, OSGVIEWER_EXPORT)
void GraphicsWindowX11::raiseWindow()
{