Permalink
Browse files

The texture matrix is now reset in Texture::bind(NULL)

  • Loading branch information...
LaurentGomila committed Sep 16, 2013
1 parent 44b98b4 commit 7c4b058c9a9682bf356ef1fa2d6c81e15b15b179
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/SFML/Graphics/Texture.cpp
@@ -485,6 +485,13 @@ void Texture::bind(const Texture* texture, CoordinateType coordinateType)
{
// Bind no texture
glCheck(glBindTexture(GL_TEXTURE_2D, 0));
// Reset the texture matrix
glCheck(glMatrixMode(GL_TEXTURE));
glCheck(glLoadIdentity());
// Go back to model-view mode (sf::RenderTarget relies on it)
glCheck(glMatrixMode(GL_MODELVIEW));
}
}

0 comments on commit 7c4b058

Please sign in to comment.