diff options
Diffstat (limited to 'src/gui/opengl')
| -rw-r--r-- | src/gui/opengl/opengl.pri | 10 | ||||
| -rw-r--r-- | src/gui/opengl/qopenglframebufferobject.cpp | 5 | ||||
| -rw-r--r-- | src/gui/opengl/qopenglversionfunctions.cpp | 2 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/gui/opengl/opengl.pri b/src/gui/opengl/opengl.pri index bdda5381ce..2c3cca6b18 100644 --- a/src/gui/opengl/opengl.pri +++ b/src/gui/opengl/opengl.pri @@ -1,9 +1,9 @@ # Qt gui library, opengl module -contains(QT_CONFIG, opengl):CONFIG += opengl -contains(QT_CONFIG, opengles2):CONFIG += opengles2 +qtConfig(opengl): CONFIG += opengl +qtConfig(opengles2): CONFIG += opengles2 -contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) { +qtConfig(opengl(es2)?) { HEADERS += opengl/qopengl.h \ opengl/qopengl_p.h \ @@ -58,7 +58,7 @@ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) { opengl/qopengltexturehelper.cpp \ opengl/qopenglpixeltransferoptions.cpp - !contains(QT_CONFIG, opengles2) { + !qtConfig(opengles2) { HEADERS += opengl/qopenglfunctions_1_0.h \ opengl/qopenglfunctions_1_1.h \ opengl/qopenglfunctions_1_2.h \ @@ -117,7 +117,7 @@ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) { opengl/qopengltimerquery.cpp } - contains(QT_CONFIG, opengles2) { + qtConfig(opengles2) { HEADERS += opengl/qopenglfunctions_es2.h SOURCES += opengl/qopenglfunctions_es2.cpp diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index 3e82d5a649..1ccd78d2ed 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -1069,6 +1069,7 @@ bool QOpenGLFramebufferObject::bind() d->funcs.glBindFramebuffer(GL_FRAMEBUFFER, d->fbo()); QOpenGLContextPrivate::get(current)->qgl_current_fbo_invalid = true; + QOpenGLContextPrivate::get(current)->qgl_current_fbo = this; if (d->format.samples() == 0) { // Create new textures to replace the ones stolen via takeTexture(). @@ -1108,7 +1109,9 @@ bool QOpenGLFramebufferObject::release() if (current) { d->funcs.glBindFramebuffer(GL_FRAMEBUFFER, current->defaultFramebufferObject()); - QOpenGLContextPrivate::get(current)->qgl_current_fbo_invalid = true; + QOpenGLContextPrivate *contextPrv = QOpenGLContextPrivate::get(current); + contextPrv->qgl_current_fbo_invalid = true; + contextPrv->qgl_current_fbo = Q_NULLPTR; } return true; diff --git a/src/gui/opengl/qopenglversionfunctions.cpp b/src/gui/opengl/qopenglversionfunctions.cpp index 9fa224b0aa..54df2e5734 100644 --- a/src/gui/opengl/qopenglversionfunctions.cpp +++ b/src/gui/opengl/qopenglversionfunctions.cpp @@ -194,7 +194,7 @@ void QAbstractOpenGLFunctionsPrivate::removeExternalFunctions(QOpenGLContext *co Please note that some vendors, notably Apple, do not implement the Compatibility profile. Therefore if you wish to target new OpenGL features - on OS X then you should ensure that you request a Core profile context via + on \macos then you should ensure that you request a Core profile context via QSurfaceFormat::setProfile(). Qt provides classes for all version and Core and Compatibility profile |
