Merge pull request #1027 from glebm/fix-windowing-system

Fix osgViewer `USE_GRAPHICSWINDOW` without a windowing system
This commit is contained in:
Robert Osfield 2021-01-18 14:47:47 +00:00 committed by GitHub
commit ce5efa9505
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -126,6 +126,9 @@ ELSE()
SET(OSG_WINDOWING_SYSTEM "X11" CACHE STRING "Windowing system type for graphics window creation; options: X11 or None.")
ENDIF()
IF(OSG_WINDOWING_SYSTEM STREQUAL "None")
SET(OSG_WINDOWING_SYSTEM_NONE ON INTERNAL "No windowing system")
ENDIF()
SET(OPENSCENEGRAPH_VERSION ${OPENSCENEGRAPH_MAJOR_VERSION}.${OPENSCENEGRAPH_MINOR_VERSION}.${OPENSCENEGRAPH_PATCH_VERSION})

View File

@ -283,7 +283,9 @@ struct GraphicsWindowFunctionProxy
extern "C" void graphicswindow_##ext(void); \
static osgViewer::GraphicsWindowFunctionProxy graphicswindowproxy_##ext(graphicswindow_##ext);
#if defined(_WIN32)
#if defined(OSG_WINDOWING_SYSTEM_NONE)
#define USE_GRAPHICS_WINDOW()
#elif defined(_WIN32)
#define USE_GRAPHICSWINDOW() USE_GRAPICSWINDOW_IMPLEMENTATION(Win32)
#elif defined(__APPLE__)
#if defined(OSG_WINDOWING_SYSTEM_CARBON)

View File

@ -37,5 +37,6 @@
#cmakedefine OSG_USE_DEPRECATED_API
#cmakedefine OSG_ENVVAR_SUPPORTED
#cmakedefine OSG_WINDOWING_SYSTEM_CARBON
#cmakedefine OSG_WINDOWING_SYSTEM_NONE
#endif