Migrate a recent QT_OPENGL_ES ifdef to dynamic GL

Change-Id: I51581cf174d11db86030da8fe288d640ef81cb58
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This commit is contained in:
Laszlo Agocs 2014-02-14 14:38:18 +01:00 committed by The Qt Project
parent d12e670a6f
commit 3dc1ccc183

View File

@ -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);