From 08f9dc1d325ac945c2e6f8f1ff6f8093b091b2fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Cr=C3=A9moux?= Date: Tue, 13 Feb 2018 13:46:11 +0300 Subject: 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 Reviewed-by: Laszlo Agocs --- src/gui/opengl/qopengltexture.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/opengl/qopengltexture.cpp') 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; -- cgit v1.2.3