Awesome, it works !
Here's a code, for those who haven't seen what i wanted to do in the first place!
#include <iostream>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#define REAL_WIDTH 20 //size of the original texture
#define REAL_HEIGHT 20
#define VIRTUAL_HEIGHT 400 //desired size for the window (multiple of the real size)
#define VIRTUAL_WIDTH 400
int main()
{
sf::RenderWindow window(sf::VideoMode(VIRTUAL_WIDTH, VIRTUAL_HEIGHT), "Test");
sf::Texture real_texture;
real_texture.loadFromFile("spin.png"); //just make a random small sprite like 10*10
sf::Sprite real_sprite(real_texture);
real_sprite.setOrigin(real_sprite.getGlobalBounds().width/2, real_sprite.getGlobalBounds().height/2);
real_sprite.setPosition(REAL_WIDTH/2, REAL_HEIGHT/2);
sf::RenderTexture real_target;
real_target.create(REAL_WIDTH, REAL_HEIGHT);
sf::Sprite virtual_sprite;
virtual_sprite.scale(VIRTUAL_WIDTH/REAL_WIDTH, VIRTUAL_HEIGHT/REAL_HEIGHT);
virtual_sprite.setTexture(real_target.getTexture());
window.setFramerateLimit(30);
sf::Event event;
while(window.isOpen())
{
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Escape))
window.close();
while(window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
window.close();
}
real_target.clear();
real_target.draw(real_sprite);
real_target.display();
//drawing
window.clear();
window.draw(virtual_sprite);
window.display();
//rotation afterwards
real_sprite.rotate(5);
}
return 0;
}
you just need to create a png image for it to work (it's a basic example of a spinning pinwheel)
Once again: thank you very much for your contribution !