Since commit
6b71456, copying a texture from a render texture causes it to be flipped.
Code to reproduce:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(400, 200), "SFML Window");
sf::RectangleShape shape{{100, 100}};
shape.setFillColor(sf::Color::Red);
sf::RenderTexture rt;
rt.create(200, 200);
rt.clear(sf::Color::White);
rt.draw(shape);
rt.display();
sf::Sprite s1(rt.getTexture());
sf::Texture t = rt.getTexture(); // Copy texture before passing it to sprite
sf::Sprite s2(t);
s2.setPosition({200, 0});
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(s1);
window.draw(s2);
window.display();
}
}
The attached images show how it looked before and after commit
6b71456.