diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp index 3563f1b5d36..b825b56d45a 100644 --- a/src/gui/opengl/qopengltexture.cpp +++ b/src/gui/opengl/qopengltexture.cpp @@ -778,6 +778,8 @@ static QOpenGLTexture::PixelFormat pixelFormatCompatibleWithInternalFormat(QOpen return QOpenGLTexture::Alpha; case QOpenGLTexture::RGBFormat: + return QOpenGLTexture::RGB; + case QOpenGLTexture::RGBAFormat: return QOpenGLTexture::RGBA;