SFML community forums
General => General discussions => Topic started by: Chocolatesheep on May 01, 2012, 02:17:17 pm
-
Just needed to ask some some questions, I'm quite new to SFML and I only used 1.6, but now I switched over to 2.0
To load an image onto a sprite I normally would have used Sprite.SetImage(Image);
But now due to the lack of the SetImage(); function I have to use Sprite.setTexture(Texture);
What I'm asking is what's the difference between Images and Textures in SFML?
And why does the Clock.getElapsedTime() no longer return a number but a sf::Time class type?
-
There's a Help forum with its own Graphics subforum, your post would fit better there.
- sf::Image (SFML 1.6) has been split into two parts: The pixel container sf::Image and the OpenGL texture wrapper sf::Texture. This allows more flexibility, for example a texture that is too big can still be stored in sf::Image.
- sf::Time has been introduced to allow people to work with their preferred unit (like seconds), while keeping a big precision also for larger time spans.
By the way, there are several forum threads which discuss these features in detail, use the forum search. The documentation is also an option.