diff options
Diffstat (limited to 'src/gui/opengl')
-rw-r--r-- | src/gui/opengl/qopenglframebufferobject.cpp | 2 | ||||
-rw-r--r-- | src/gui/opengl/qopenglfunctions.cpp | 2 | ||||
-rw-r--r-- | src/gui/opengl/qopengltexture.cpp | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index d697a465dc..e35db51e01 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -1083,8 +1083,6 @@ bool QOpenGLFramebufferObject::bind() } } - d->valid = d->checkFramebufferStatus(current); - return d->valid; } diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp index 8d1c539569..22b5d634da 100644 --- a/src/gui/opengl/qopenglfunctions.cpp +++ b/src/gui/opengl/qopenglfunctions.cpp @@ -102,7 +102,7 @@ Q_LOGGING_CATEGORY(lcGLES3, "qt.opengl.es3") // Setup scene and render it initializeGL(); - paintGL() + paintGL(); } void MyGLWindow::initializeGL() diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp index 9105d3a4bd..a0b482e1d2 100644 --- a/src/gui/opengl/qopengltexture.cpp +++ b/src/gui/opengl/qopengltexture.cpp @@ -3228,6 +3228,12 @@ void QOpenGLTexture::setData(const QImage& image, MipMapGeneration genMipMaps) qWarning("QOpenGLTexture::setData() requires a valid current context"); return; } + + if (image.isNull()) { + qWarning("QOpenGLTexture::setData() tried to set a null image"); + return; + } + if (context->isOpenGLES() && context->format().majorVersion() < 3) setFormat(QOpenGLTexture::RGBAFormat); else |