summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_p.h
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-12-03 10:53:31 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-12-04 18:07:56 (GMT)
commit60be72310c0f9469b3201b250b257473184ccf2a (patch)
treec8203883aecb1f700e97c978b3e47e3cf5209c87 /src/opengl/qgl_p.h
parent1dc664cd24e3225fe2fcfd7552b3fa02fa4b8f9a (diff)
downloadQt-60be72310c0f9469b3201b250b257473184ccf2a.zip
Qt-60be72310c0f9469b3201b250b257473184ccf2a.tar.gz
Qt-60be72310c0f9469b3201b250b257473184ccf2a.tar.bz2
Fixed OpenGL graphicssystem issues for OpenGL ES 2.0 platforms.
The format and internal_format parameters to glTexImage2D need to always match on OpenGL ES 2.0. Reviewed-by: Tom Cooksey
Diffstat (limited to 'src/opengl/qgl_p.h')
-rw-r--r--src/opengl/qgl_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index ab72c9c..b2407ba 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -518,7 +518,8 @@ bool qt_gl_preferGL2Engine();
inline GLenum qt_gl_preferredTextureFormat()
{
- return QSysInfo::ByteOrder == QSysInfo::BigEndian ? GL_RGBA : GL_BGRA;
+ return (QGLExtensions::glExtensions & QGLExtensions::BGRATextureFormat) && QSysInfo::ByteOrder == QSysInfo::LittleEndian
+ ? GL_BGRA : GL_RGBA;
}
inline GLenum qt_gl_preferredTextureTarget()