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

This commit is contained in:
Laurent Gomila 2013-09-16 22:30:58 +02:00
parent 44b98b4406
commit 7c4b058c9a

View File

@ -485,6 +485,13 @@ void Texture::bind(const Texture* texture, CoordinateType coordinateType)
{ {
// Bind no texture // Bind no texture
glCheck(glBindTexture(GL_TEXTURE_2D, 0)); 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));
} }
} }