diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-10-27 10:10:00 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-10-27 10:10:00 (GMT) |
commit | 8b2a5214a46fa15b0394ee3c8147343fc79e44d4 (patch) | |
tree | 31833efe4e3edff614dbd31ec90d33d2e402d162 /src/opengl | |
parent | 44e9d5264217782762432bb0f4b7c441b4a545cd (diff) | |
download | Qt-8b2a5214a46fa15b0394ee3c8147343fc79e44d4.zip Qt-8b2a5214a46fa15b0394ee3c8147343fc79e44d4.tar.gz Qt-8b2a5214a46fa15b0394ee3c8147343fc79e44d4.tar.bz2 |
Reset the GL error stack prior to checking for errors in bindTexture()
Reviewed-by: Tom
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qgl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 6720ae7..e80521b 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -2156,6 +2156,11 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G time.start(); #endif +#ifndef QT_NO_DEBUG + // Reset the gl error stack...git + while (glGetError() != GL_NO_ERROR); +#endif + // Scale the pixmap if needed. GL textures needs to have the // dimensions 2^n+2(border) x 2^m+2(border), unless we're using GL // 2.0 or use the GL_TEXTURE_RECTANGLE texture target |