From 65755f9a68947e774c640ce92c022d677acdcc4a Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 6 Nov 2012 12:22:39 +0100 Subject: Fix native RGB text on OpenGL ES 2 without BGRA extension MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Angle, for instance, which is now the default on Windows, does not support the GL_BGRA_EXT format as input for glTexSubImage2D(). In the case where it's not detected, we therefore need to flip the bytes in the input. Change-Id: Ibe78d0223e3c2c39cb1943cdcf67103044d00aa7 Reviewed-by: Samuel Rødal --- src/gui/opengl/qopenglfunctions.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/opengl/qopenglfunctions.cpp') diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp index e2191d6f3a..4d6a0e437d 100644 --- a/src/gui/opengl/qopenglfunctions.cpp +++ b/src/gui/opengl/qopenglfunctions.cpp @@ -344,6 +344,10 @@ static int qt_gl_resolve_extensions() extensions |= QOpenGLExtensions::ElementIndexUint; if (extensionMatcher.match("GL_OES_depth24")) extensions |= QOpenGLExtensions::Depth24; + + if (extensionMatcher.match("GL_EXT_bgra")) + extensions |= QOpenGLExtensions::BGRATextureFormat; + #else extensions |= QOpenGLExtensions::ElementIndexUint | QOpenGLExtensions::MapBuffer; -- cgit v1.2.3