From 9f0d6882babb581494db7e593dc8199c5711f73f Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Thu, 4 Nov 2010 21:51:27 +0000 Subject: [PATCH] Fixed a bug in sf::Shader with textures git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1611 4e206d99-4929-0410-ac5d-dfc041789085 --- src/SFML/Graphics/Shader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SFML/Graphics/Shader.cpp b/src/SFML/Graphics/Shader.cpp index 55719d52a..df7035e98 100644 --- a/src/SFML/Graphics/Shader.cpp +++ b/src/SFML/Graphics/Shader.cpp @@ -248,9 +248,6 @@ void Shader::Bind() const // Bind the textures BindTextures(); - // Make sure that the texture unit which is left active is the number 0 - GLCheck(glActiveTextureARB(GL_TEXTURE0_ARB)); - // Bind the current texture if (myCurrentTexture != -1) GLCheck(glUniform1iARB(myCurrentTexture, 0)); @@ -403,6 +400,9 @@ void Shader::BindTextures() const it->second->Bind(); it++; } + + // Make sure that the texture unit which is left active is the number 0 + GLCheck(glActiveTextureARB(GL_TEXTURE0_ARB)); }