diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a18930af..8b055179d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -542,12 +542,12 @@ ELSE() OPTION(OSG_CPP_EXCEPTIONS_AVAILABLE "Set to OFF to disable compile of OSG components that use C++ exceptions." ON) ENDIF() -SET(OSG_GL_CONTEXT_VERSION "1.0" CACHE STRING "GL Context String to pass when creaing graphics contexts") # Map the OSG_GL*_AVAILABLE settings to OpenGL header settings +SET(DEFAULT_GL_CONTEXT_VERSION "1.0") IF (OSG_GL3_AVAILABLE) - SET(OSG_GL_CONTEXT_VERSION "3.3") + SET(DEFAULT_GL_CONTEXT_VERSION "3.3") IF (APPLE) SET(OPENGL_HEADER1 "#include " CACHE STRING "#include<> line for OpenGL Header") @@ -600,6 +600,8 @@ ELSE() ENDIF() ENDIF() +SET(OSG_GL_CONTEXT_VERSION ${DEFAULT_GL_CONTEXT_VERSION} CACHE STRING "GL Context String to pass when creaing graphics contexts") + IF (OSG_GL1_AVAILABLE) SET(OSG_GL1_FEATURES 1) ELSE()