mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Minor modification in sf::Renderer
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1757 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
9d777f43e5
commit
23d0ee8550
@ -246,7 +246,7 @@ void Renderer::SetTexture(const Image* texture)
|
||||
myTextureId = texture ? texture->myTexture : 0;
|
||||
myTextureIsValid = true;
|
||||
}
|
||||
else if (texture)
|
||||
else if (texture && myTextureIsValid)
|
||||
{
|
||||
// If the texture was already the current one, make sure that
|
||||
// it is synchronized (in case it was modified since last use)
|
||||
@ -273,7 +273,7 @@ void Renderer::SetShader(const Shader* shader)
|
||||
myShaderIsValid = true;
|
||||
}
|
||||
}
|
||||
else if (shader)
|
||||
else if (shader && myShaderIsValid)
|
||||
{
|
||||
// If the shader was already the current one, make sure that
|
||||
// it is synchronized (in case it was modified since last use)
|
||||
|
Loading…
Reference in New Issue
Block a user