mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Fixing case on gl surface format helper
This commit is contained in:
parent
0023c034c4
commit
cc80dfb9e1
7 changed files with 11 additions and 14 deletions
|
@ -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, [] {
|
||||
|
|
|
@ -19,6 +19,6 @@
|
|||
class QSurfaceFormat;
|
||||
class QGLFormat;
|
||||
|
||||
const QSurfaceFormat& getDefaultOpenGlSurfaceFormat();
|
||||
const QSurfaceFormat& getDefaultOpenGLSurfaceFormat();
|
||||
const QGLFormat& getDefaultGLFormat();
|
||||
#endif
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -128,7 +128,7 @@ protected:
|
|||
public:
|
||||
QTestWindow() {
|
||||
setSurfaceType(QSurface::OpenGLSurface);
|
||||
QSurfaceFormat format = getDefaultOpenGlSurfaceFormat();
|
||||
QSurfaceFormat format = getDefaultOpenGLSurfaceFormat();
|
||||
setFormat(format);
|
||||
_context = new QOpenGLContext;
|
||||
_context->setFormat(format);
|
||||
|
|
Loading…
Reference in a new issue