I am having an issue that probably stems from some misunderstanding of sf::Shader::CurrentTexture, but I am very confused.
This code sets the texture in my shader correctly, and everything works.
pShader.setUniform("u_texture", *texture);
However, I had a bug in part of my code for awhile where it wasn't working, and I couldn't figure out why. After investigating a bit, I found that I had set the texture parameter earlier like this.
pShader.setUniform("u_texture", sf::Shader::CurrentTexture);
But my understanding of uniforms is that I can freely update them. Running this code:
pShader.setUniform("u_texture", sf::Shader::CurrentTexture);
pShader.setUniform("u_texture", *texture);
the second line is ignored completely, and the texture doesn't get set correctly. Can someone explain this to me?