GLESGraphicSystem: unbind surface texture after rendering surface
authorRahul Singhal <rasinghal@nvidia.com>
Mon, 19 Mar 2012 12:13:52 +0000 (17:43 +0530)
committerMichael Schuldt <michael.schuldt@bmw.de>
Fri, 23 Mar 2012 09:28:57 +0000 (10:28 +0100)
LayerManagerPlugins/Renderers/Graphic/src/GraphicSystems/GLESGraphicSystem.cpp

index cb5de23..9ee8909 100644 (file)
@@ -349,8 +349,8 @@ void GLESGraphicsystem::renderSurface(Surface* surface)
     shader->loadUniforms();
     /* Bind texture and set section */
     glActiveTexture(GL_TEXTURE0);
-    if (false == m_binder->bindSurfaceTexture(surface)) 
-    {   
+    if (false == m_binder->bindSurfaceTexture(surface))
+    {
         LOG_WARNING("GLESGraphicsystem", "Surface not successfully bind " << surface->getID());
         return;
     }
@@ -366,6 +366,7 @@ void GLESGraphicsystem::renderSurface(Surface* surface)
     glDrawArrays(GL_TRIANGLES, index, 6);
 
     glBindBuffer(GL_ARRAY_BUFFER, 0);
+    m_binder->unbindSurfaceTexture(surface);
     glErrorCode = glGetError();
     if ( GL_NO_ERROR != glErrorCode )
     {