summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopengltexture.cpp
diff options
context:
space:
mode:
authorDavid Crémoux <david@adeko.com>2018-02-13 13:46:11 +0300
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-02-14 09:02:26 +0000
commit08f9dc1d325ac945c2e6f8f1ff6f8093b091b2fd (patch)
tree89f08e015271e0ba7959db7cb3477db5a58acacf /src/gui/opengl/qopengltexture.cpp
parent666d7745eb4f836eadc70da2bf841df5dee7a9e7 (diff)
Fix creation of RGB texture with QOpenGLTexture/Qt3D on OpenGL ES 2.0
Modification of the function pixelFormatCompatibleWithInternalFormat to not change RGB pixel format to RGBA one, allowing the creation of valid RGB textures with Qt3D. Task-number: QTBUG-66365 Change-Id: I5c3187a3fefaedf85140f80fbb7145e1a762805b Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/gui/opengl/qopengltexture.cpp')
-rw-r--r--src/gui/opengl/qopengltexture.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp
index 3563f1b5d3..b825b56d45 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;