Bonjour à tous,
je commence la SFML, et j’ai un peu de mal à différencier ces trois objets. Voilà ce que j’ai pu trouver:
Image vs Texture:
The main difference between images and textures is their purpose-, manipulation and rendering, respectively. The Image class handles image loading, saving, and pixel manipulation, whereas the Texture class is used for rendering.
What is the difference between sf::Image and sf::Texture?
In essence, there is no difference between the two data structures. The main question you have to ask yourself is not what the difference is, but where the data is stored.
Texture vs Sprite
First we have the sf::Texture class that holds the actual image data loaded from the hard drive. Next is the sf::Sprite class that represents an instance with position and orientation in the scene. The texture describes the image, while the sprite describes where and how to put one on the screen.
Donc le Sprite définit comment l’image doit être placée sur l’écran ? Pour Image et Texture j’ai vraiment du mal…
Merci d’avance.