Added OSG_GL_CONTEXT_STRING cmake variable to set include/osg/GL headers that sets Traits::glContextVersion.
This commit is contained in:
parent
4dd1156444
commit
1aa0a80de7
@ -556,9 +556,13 @@ 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_STRING "1.0" CACHE STRING "GL Context String to pass when creaing graphics contexts")
|
||||
|
||||
# Map the OSG_GL*_AVAILABLE settings to OpenGL header settings
|
||||
IF (OSG_GL3_AVAILABLE)
|
||||
|
||||
SET(OSG_GL_CONTEXT_STRING "3.3")
|
||||
|
||||
IF (APPLE)
|
||||
SET(OPENGL_HEADER1 "#include <OpenGL/gl.h>" CACHE STRING "#include<> line for OpenGL Header")
|
||||
SET(OPENGL_HEADER2 "#include <OpenGL/gl3.h>" CACHE STRING "#include<> line for additional OpenGL Headers if required")
|
||||
|
@ -240,7 +240,7 @@ void DisplaySettings::setDefaults()
|
||||
|
||||
_implicitBufferAttachmentRenderMask = DEFAULT_IMPLICIT_BUFFER_ATTACHMENT;
|
||||
_implicitBufferAttachmentResolveMask = DEFAULT_IMPLICIT_BUFFER_ATTACHMENT;
|
||||
_glContextVersion = "1.0";
|
||||
_glContextVersion = OSG_GL_CONTEXT_STRING;
|
||||
_glContextFlags = 0;
|
||||
_glContextProfileMask = 0;
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
#define OSG_GLES1_FEATURES @OSG_GLES1_FEATURES@
|
||||
#define OSG_GLES2_FEATURES @OSG_GLES2_FEATURES@
|
||||
#define OSG_GLES3_FEATURES @OSG_GLES3_FEATURES@
|
||||
#define OSG_GL_CONTEXT_STRING "@OSG_GL_CONTEXT_STRING@"
|
||||
|
||||
|
||||
#ifndef WIN32
|
||||
|
@ -239,7 +239,7 @@ GraphicsContext::Traits::Traits(DisplaySettings* ds):
|
||||
swapBarrier(0),
|
||||
useMultiThreadedOpenGLEngine(false),
|
||||
useCursor(true),
|
||||
glContextVersion("1.0"),
|
||||
glContextVersion(OSG_GL_CONTEXT_STRING),
|
||||
glContextFlags(0),
|
||||
glContextProfileMask(0),
|
||||
sharedContext(0),
|
||||
|
Loading…
Reference in New Issue
Block a user