What I've got is
sf::RenderWindow Window(sf::VideoMode(1536, 768), "", sf::Style::Close);
sf::View View(Window.getDefaultView());
sf::FloatRect fBounds(0.f, 0.f, 10.f, 1000.f); // arbitrary > view height
sf::Texture Texture;
Texture.loadFromFile("C:/.../.png");
sf::IntRect iBounds(fBounds);
Texture.setRepeated(true); // repeat tile over sprite height
sf::Sprite Sprite(Texture, iBounds);
// move sprite 'up' by its height except the view height for start:
Sprite.setPosition(fBounds.left, fBounds.top - 1000.f + View.getSize().y);
while (Window.isOpen()) {
View.move(0.f, -1.f); // negative y to move 'up' along sprite height
Window.clear();
Window.setView(View);
Window.draw(Sprite);
Window.display();
}
Although I got confused with the y-axis pointing downward and the .png upward, this now repeatedly tiles the sprite (vertically), up to sprite height only however.
Is it possible, and how, to make the .png tiling truly infinite, or at least overcome the iBounds restriction?
Thanks