From 3dc1ccc18328773c6d866ad2b56d819cb23b8d4a Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 14 Feb 2014 14:38:18 +0100 Subject: [PATCH] Migrate a recent QT_OPENGL_ES ifdef to dynamic GL Change-Id: I51581cf174d11db86030da8fe288d640ef81cb58 Reviewed-by: Paul Olav Tvete --- src/gui/painting/qplatformbackingstore.cpp | 6 ++++-- 1 file 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);