summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-02-14 14:38:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-14 15:10:00 +0100
commit3dc1ccc18328773c6d866ad2b56d819cb23b8d4a (patch)
tree5580c61a19b757e4b972d394de71a3b93308b86c /src/gui
parentd12e670a6f8e4d0a82b691486bd0046d8edb2c63 (diff)
Migrate a recent QT_OPENGL_ES ifdef to dynamic GL
Change-Id: I51581cf174d11db86030da8fe288d640ef81cb58 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qplatformbackingstore.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp
index a77fbb6826..58fe28bb48 100644
--- a/src/gui/painting/qplatformbackingstore.cpp
+++ b/src/gui/painting/qplatformbackingstore.cpp
@@ -288,8 +288,10 @@ GLuint QPlatformBackingStore::toTexture(const QRegion &dirtyRegion) const
glGenTextures(1, &d_ptr->textureId);
glBindTexture(GL_TEXTURE_2D, d_ptr->textureId);
#ifndef QT_OPENGL_ES_2
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
+ if (!QOpenGLFunctions::isES()) {
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
+ }
#endif
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);