From a41de3a60dc71932e4f1b9e3d6ab297fda5a0be8 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Mon, 23 May 2016 15:46:47 -0700 Subject: [PATCH] Making GL 4.5 enabled by default, adding logging --- libraries/gpu-gl/src/gpu/gl/GLBackend.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libraries/gpu-gl/src/gpu/gl/GLBackend.cpp b/libraries/gpu-gl/src/gpu/gl/GLBackend.cpp index 32e063a4c6..60641c122d 100644 --- a/libraries/gpu-gl/src/gpu/gl/GLBackend.cpp +++ b/libraries/gpu-gl/src/gpu/gl/GLBackend.cpp @@ -32,17 +32,19 @@ using namespace gpu; using namespace gpu::gl; -static const QString DEBUG_FLAG("HIFI_ENABLE_OPENGL_45"); -bool enableOpenGL45 = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG); +static const QString DEBUG_FLAG("HIFI_DISABLE_OPENGL_45"); +bool disableOpenGL45 = QProcessEnvironment::systemEnvironment().contains(DEBUG_FLAG); Backend* GLBackend::createBackend() { // FIXME provide a mechanism to override the backend for testing // Where the gpuContext is initialized and where the TRUE Backend is created and assigned auto version = QOpenGLContextWrapper::currentContextVersion(); GLBackend* result; - if (enableOpenGL45 && version >= 0x0405) { + if (!disableOpenGL45 && version >= 0x0405) { + qDebug() << "OpenGL 4.5 detected"; result = new gpu::gl45::GL45Backend(); } else { + qDebug() << "OpenGL 4.5 not detected / enabled, using compatibility backend"; result = new gpu::gl41::GL41Backend(); } result->initInput();