summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglfunctions.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2012-11-06 12:22:39 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-06 12:36:16 +0100
commit65755f9a68947e774c640ce92c022d677acdcc4a (patch)
treeae6486b03db9f65c64483e1e374eaddecbebc8ca /src/gui/opengl/qopenglfunctions.cpp
parentcf1eb700702aec473db0a4794b1a6549ee10bb62 (diff)
Fix native RGB text on OpenGL ES 2 without BGRA extension
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 <samuel.rodal@digia.com>
Diffstat (limited to 'src/gui/opengl/qopenglfunctions.cpp')
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp4
1 files changed, 4 insertions, 0 deletions
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;