From d660b29ef072b2685df398bfdd073c0a38aea73f Mon Sep 17 00:00:00 2001 From: Daniel Emminizer Date: Tue, 24 Apr 2018 06:31:32 -0400 Subject: [PATCH] When GL3 build is enabled, default context requested is version 3.3, enabling core profile by default. --- src/osg/DisplaySettings.cpp | 4 ++++ src/osg/GraphicsContext.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/osg/DisplaySettings.cpp b/src/osg/DisplaySettings.cpp index 1fd685b33..aceaf4e70 100644 --- a/src/osg/DisplaySettings.cpp +++ b/src/osg/DisplaySettings.cpp @@ -240,7 +240,11 @@ void DisplaySettings::setDefaults() _implicitBufferAttachmentRenderMask = DEFAULT_IMPLICIT_BUFFER_ATTACHMENT; _implicitBufferAttachmentResolveMask = DEFAULT_IMPLICIT_BUFFER_ATTACHMENT; +#ifdef OSG_GL3_FEATURES + _glContextVersion = "3.3"; +#else _glContextVersion = "1.0"; +#endif _glContextFlags = 0; _glContextProfileMask = 0; diff --git a/src/osg/GraphicsContext.cpp b/src/osg/GraphicsContext.cpp index e73ec3e6a..40fda7d08 100644 --- a/src/osg/GraphicsContext.cpp +++ b/src/osg/GraphicsContext.cpp @@ -239,7 +239,11 @@ GraphicsContext::Traits::Traits(DisplaySettings* ds): swapBarrier(0), useMultiThreadedOpenGLEngine(false), useCursor(true), +#ifdef OSG_GL3_FEATURES + glContextVersion("3.3"), +#else glContextVersion("1.0"), +#endif glContextFlags(0), glContextProfileMask(0), sharedContext(0),