diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-02-06 10:18:11 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-20 10:33:35 +0100 |
commit | 3eeaf987123f73ad7a4745745d9e7c70f30942cd (patch) | |
tree | c8d3b0fffa0bfed3a6133c554a754df98496d32f | |
parent | f6c92aacb32721a4a22bd803e53c7a4d3dc2635f (diff) | |
download | qtquick1-3eeaf987123f73ad7a4745745d9e7c70f30942cd.tar.gz |
Dynamic GL support in Quick1's ShaderEffectSourcev5.3.0-alpha1
Not strictly necessary but it is better not to call glEnable()
with values that are not supported by GLES2. This way the
error state will not polluted by an invalid_enum or similar.
Change-Id: I952273f1814d9f124e5c4baa6196386645202439
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
-rw-r--r-- | src/imports/shaders/shadereffectsource.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/imports/shaders/shadereffectsource.cpp b/src/imports/shaders/shadereffectsource.cpp index f58b5464..b5462c71 100644 --- a/src/imports/shaders/shadereffectsource.cpp +++ b/src/imports/shaders/shadereffectsource.cpp @@ -285,7 +285,8 @@ void ShaderEffectSource::bind() GLuint vwrap = (m_wrapMode == Repeat || m_wrapMode == RepeatVertically) ? GL_REPEAT : GL_CLAMP_TO_EDGE; #if !defined(QT_OPENGL_ES_2) - glEnable(GL_TEXTURE_2D); + if (!QOpenGLFunctions::isES()) + glEnable(GL_TEXTURE_2D); #endif if (m_fbo && m_fbo->isValid()) { |