From cc80dfb9e17d0dfae836eb13f8fa018fa51c28eb Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Thu, 3 Dec 2015 11:08:56 -0800 Subject: [PATCH] Fixing case on gl surface format helper --- libraries/gl/src/gl/GLHelpers.cpp | 2 +- libraries/gl/src/gl/GLHelpers.h | 2 +- libraries/gl/src/gl/GLWidget.cpp | 7 +++---- libraries/gl/src/gl/GLWidget.h | 8 +++----- libraries/gl/src/gl/GLWindow.cpp | 2 +- libraries/gl/src/gl/OffscreenGLCanvas.cpp | 2 +- tests/shaders/src/main.cpp | 2 +- 7 files changed, 11 insertions(+), 14 deletions(-) diff --git a/libraries/gl/src/gl/GLHelpers.cpp b/libraries/gl/src/gl/GLHelpers.cpp index 9022f0ffcc..6ad7f816b8 100644 --- a/libraries/gl/src/gl/GLHelpers.cpp +++ b/libraries/gl/src/gl/GLHelpers.cpp @@ -5,7 +5,7 @@ #include #include -const QSurfaceFormat& getDefaultOpenGlSurfaceFormat() { +const QSurfaceFormat& getDefaultOpenGLSurfaceFormat() { static QSurfaceFormat format; static std::once_flag once; std::call_once(once, [] { diff --git a/libraries/gl/src/gl/GLHelpers.h b/libraries/gl/src/gl/GLHelpers.h index de9e8f5d85..335272d991 100644 --- a/libraries/gl/src/gl/GLHelpers.h +++ b/libraries/gl/src/gl/GLHelpers.h @@ -19,6 +19,6 @@ class QSurfaceFormat; class QGLFormat; -const QSurfaceFormat& getDefaultOpenGlSurfaceFormat(); +const QSurfaceFormat& getDefaultOpenGLSurfaceFormat(); const QGLFormat& getDefaultGLFormat(); #endif diff --git a/libraries/gl/src/gl/GLWidget.cpp b/libraries/gl/src/gl/GLWidget.cpp index ec08d70e7a..310675c01f 100644 --- a/libraries/gl/src/gl/GLWidget.cpp +++ b/libraries/gl/src/gl/GLWidget.cpp @@ -1,9 +1,8 @@ // -// GLWidget.cpp -// interface/src // -// Created by Stephen Birarda on 8/14/13. -// Copyright 2013 High Fidelity, Inc. +// Created by Bradley Austin Davis on 2015/12/03 +// Derived from interface/src/GLCanvas.cpp created by Stephen Birarda on 8/14/13. +// Copyright 2013-2015 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html diff --git a/libraries/gl/src/gl/GLWidget.h b/libraries/gl/src/gl/GLWidget.h index 5c4f4305cc..df4a73ac50 100644 --- a/libraries/gl/src/gl/GLWidget.h +++ b/libraries/gl/src/gl/GLWidget.h @@ -1,9 +1,7 @@ // -// GLWidget.h -// interface/src -// -// Created by Stephen Birarda on 8/14/13. -// Copyright 2013 High Fidelity, Inc. +// Created by Bradley Austin Davis on 2015/12/03 +// Derived from interface/src/GLCanvas.h created by Stephen Birarda on 8/14/13. +// Copyright 2013-2015 High Fidelity, Inc. // // Distributed under the Apache License, Version 2.0. // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html diff --git a/libraries/gl/src/gl/GLWindow.cpp b/libraries/gl/src/gl/GLWindow.cpp index 42914fed59..78c7666d25 100644 --- a/libraries/gl/src/gl/GLWindow.cpp +++ b/libraries/gl/src/gl/GLWindow.cpp @@ -14,7 +14,7 @@ #include "GLHelpers.h" void GLWindow::createContext(QOpenGLContext* shareContext) { - createContext(getDefaultOpenGlSurfaceFormat(), shareContext); + createContext(getDefaultOpenGLSurfaceFormat(), shareContext); } void GLWindow::createContext(const QSurfaceFormat& format, QOpenGLContext* shareContext) { diff --git a/libraries/gl/src/gl/OffscreenGLCanvas.cpp b/libraries/gl/src/gl/OffscreenGLCanvas.cpp index b8c9b9e117..640c8ed5f5 100644 --- a/libraries/gl/src/gl/OffscreenGLCanvas.cpp +++ b/libraries/gl/src/gl/OffscreenGLCanvas.cpp @@ -37,7 +37,7 @@ void OffscreenGLCanvas::create(QOpenGLContext* sharedContext) { sharedContext->doneCurrent(); _context->setShareContext(sharedContext); } - _context->setFormat(getDefaultOpenGlSurfaceFormat()); + _context->setFormat(getDefaultOpenGLSurfaceFormat()); _context->create(); _offscreenSurface->setFormat(_context->format()); diff --git a/tests/shaders/src/main.cpp b/tests/shaders/src/main.cpp index 3edff67d66..f65cd9b5aa 100644 --- a/tests/shaders/src/main.cpp +++ b/tests/shaders/src/main.cpp @@ -128,7 +128,7 @@ protected: public: QTestWindow() { setSurfaceType(QSurface::OpenGLSurface); - QSurfaceFormat format = getDefaultOpenGlSurfaceFormat(); + QSurfaceFormat format = getDefaultOpenGLSurfaceFormat(); setFormat(format); _context = new QOpenGLContext; _context->setFormat(format);