Fixing case on gl surface format helper

This commit is contained in:
Brad Davis 2015-12-03 11:08:56 -08:00
parent 0023c034c4
commit cc80dfb9e1
7 changed files with 11 additions and 14 deletions

View file

@ -5,7 +5,7 @@
#include <QtGui/QSurfaceFormat>
#include <QtOpenGL/QGL>
const QSurfaceFormat& getDefaultOpenGlSurfaceFormat() {
const QSurfaceFormat& getDefaultOpenGLSurfaceFormat() {
static QSurfaceFormat format;
static std::once_flag once;
std::call_once(once, [] {

View file

@ -19,6 +19,6 @@
class QSurfaceFormat;
class QGLFormat;
const QSurfaceFormat& getDefaultOpenGlSurfaceFormat();
const QSurfaceFormat& getDefaultOpenGLSurfaceFormat();
const QGLFormat& getDefaultGLFormat();
#endif

View file

@ -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

View file

@ -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

View file

@ -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) {

View file

@ -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());

View file

@ -128,7 +128,7 @@ protected:
public:
QTestWindow() {
setSurfaceType(QSurface::OpenGLSurface);
QSurfaceFormat format = getDefaultOpenGlSurfaceFormat();
QSurfaceFormat format = getDefaultOpenGLSurfaceFormat();
setFormat(format);
_context = new QOpenGLContext;
_context->setFormat(format);