diff options
author | Sean Harmer <sean.harmer.qnx@kdab.com> | 2012-08-20 15:52:30 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-21 19:41:51 +0200 |
commit | e06f9721196baf84fc54aaa68835e198e5bcb3fc (patch) | |
tree | 3d6f188f0b9ebd2ff20e5b96602ae7c451bb3d0d | |
parent | 8459d77540a66ea6592fb08a7667c648ad6d21ff (diff) |
Fix compilation on ES2 following import of Khronos OpenGL headers
DXT3 and DXT5 are not supported with OpenGL ES2. We now have to be more
careful about such assumptions about OpenGL definitions. QtBase is now
using the official Khronos OpenGL extension headers rather
than #defining symbols all over the place.
This will allow us to more easily write correct code and to detect such
issues at compile time rather than at runtime.
Change-Id: I7a5d7592b55ea075f58a942f09fa93e85ecc4c27
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: Sarah Jane Smith <sez@storybridge.org>
-rw-r--r-- | src/threed/textures/qgltextureutils.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/threed/textures/qgltextureutils.cpp b/src/threed/textures/qgltextureutils.cpp index e1e4c06e9..acd620042 100644 --- a/src/threed/textures/qgltextureutils.cpp +++ b/src/threed/textures/qgltextureutils.cpp @@ -569,12 +569,14 @@ bool QGLBoundTexture::bindCompressedTextureDDS(const char *buf, int len) format = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT; blockSize = 8; break; +#if !defined(QT_OPENGL_ES_2) case FOURCC_DXT3: format = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; break; case FOURCC_DXT5: format = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; break; +#endif default: qWarning("QGLBoundTexture::bindCompressedTextureDDS(): DDS image format not supported."); return false; |