From 69216ca888373e8ca82dfe75fd940fc2ab824c2c Mon Sep 17 00:00:00 2001
From: Stefano Pironato <stefano.pironato@nokia.com>
Date: Wed, 28 Oct 2009 14:48:44 +0200
Subject: Fix bug for message error "Texture updload failed, error code 0x500"

The error message come from the QGLContextPrivate::bindTexture.
But since OpenGl errors are retains until glGetError is called the
actual error was happening somewhere else.
After adding in all the gl* call a check for a gl error, I was able
to get the place where opengl fail with a GL_INVALID_ENUM.
This happen in the call of glEnable(GL_TEXTURE_2D) in the file
qgl_x11egl.cpp. This glEnable call does not need: removed.

Reviewed-by: Tom Cooksey
---
 src/opengl/qgl_x11egl.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index 3894ed1..7180682 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -589,7 +589,6 @@ QGLTexture *QGLContextPrivate::bindTextureFromNativePixmap(QPixmapData* pd, cons
 
     GLuint textureId;
     glGenTextures(1, &textureId);
-    glEnable(GL_TEXTURE_2D);
     glBindTexture(GL_TEXTURE_2D, textureId);
 
     // bind the egl pixmap surface to a texture
-- 
cgit v0.12

