Merge pull request #595 from cxw42/cygx11
Remove duplication of REGISTER_WINDOWINGSYSTEMINTERFACE code in GraphicsWindowWin32
This commit is contained in:
commit
1b4677c98a
@ -597,10 +597,15 @@ struct WindowingSystemInterfaceProxy
|
|||||||
osg::ref_ptr<T> _wsi;
|
osg::ref_ptr<T> _wsi;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define REGISTER_WINDOWINGSYSTEMINTERFACE(ext, classname) \
|
// Internal use only - compile on C90 compilers, which prohibit empty macro arguments.
|
||||||
extern "C" void graphicswindow_##ext(void) {} \
|
#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);
|
static osg::WindowingSystemInterfaceProxy<classname> s_proxy_##classname(#ext);
|
||||||
|
|
||||||
|
#define REGISTER_WINDOWINGSYSTEMINTERFACE(ext, classname) \
|
||||||
|
REGISTER_WINDOWINGSYSTEMINTERFACE2(ext, classname, _OSG_GRAPHICSCONTEXT_NO_ATTRIBS)
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3148,8 +3148,7 @@ static RegisterWindowingSystemInterfaceProxy createWindowingSystemInterfaceProxy
|
|||||||
} // namespace OsgViewer
|
} // namespace OsgViewer
|
||||||
|
|
||||||
|
|
||||||
extern "C" OSGVIEWER_EXPORT void graphicswindow_Win32(void) {}
|
REGISTER_WINDOWINGSYSTEMINTERFACE2(Win32,Win32WindowingSystem,OSGVIEWER_EXPORT)
|
||||||
static osg::WindowingSystemInterfaceProxy<Win32WindowingSystem> s_proxy_Win32WindowingSystem("Win32");
|
|
||||||
|
|
||||||
void GraphicsWindowWin32::raiseWindow()
|
void GraphicsWindowWin32::raiseWindow()
|
||||||
{
|
{
|
||||||
|
@ -2277,7 +2277,7 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
REGISTER_WINDOWINGSYSTEMINTERFACE(X11, X11WindowingSystemInterface)
|
REGISTER_WINDOWINGSYSTEMINTERFACE2(X11, X11WindowingSystemInterface, OSGVIEWER_EXPORT)
|
||||||
|
|
||||||
void GraphicsWindowX11::raiseWindow()
|
void GraphicsWindowX11::raiseWindow()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user