Skip to content

Commit

Permalink
Renamed CMake variable + C++ #define to OSG_GL_CONTEXT_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
robertosfield committed Apr 24, 2018
1 parent ef3d672 commit e2e8e77
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -556,12 +556,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_STRING "1.0" CACHE STRING "GL Context String to pass when creaing graphics contexts")
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
IF (OSG_GL3_AVAILABLE)

SET(OSG_GL_CONTEXT_STRING "3.3")
SET(OSG_GL_CONTEXT_VERSION "3.3")

IF (APPLE)
SET(OPENGL_HEADER1 "#include <OpenGL/gl.h>" CACHE STRING "#include<> line for OpenGL Header")
Expand Down
2 changes: 1 addition & 1 deletion src/osg/DisplaySettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ void DisplaySettings::setDefaults()

_implicitBufferAttachmentRenderMask = DEFAULT_IMPLICIT_BUFFER_ATTACHMENT;
_implicitBufferAttachmentResolveMask = DEFAULT_IMPLICIT_BUFFER_ATTACHMENT;
_glContextVersion = OSG_GL_CONTEXT_STRING;
_glContextVersion = OSG_GL_CONTEXT_VERSION;
_glContextFlags = 0;
_glContextProfileMask = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/osg/GL.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +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@"
#define OSG_GL_CONTEXT_VERSION "@OSG_GL_CONTEXT_VERSION@"


#ifndef WIN32
Expand Down
2 changes: 1 addition & 1 deletion src/osg/GraphicsContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ GraphicsContext::Traits::Traits(DisplaySettings* ds):
swapBarrier(0),
useMultiThreadedOpenGLEngine(false),
useCursor(true),
glContextVersion(OSG_GL_CONTEXT_STRING),
glContextVersion(OSG_GL_CONTEXT_VERSION),
glContextFlags(0),
glContextProfileMask(0),
sharedContext(0),
Expand Down

0 comments on commit e2e8e77

Please sign in to comment.