Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Why use Sprite instead of textured RectangleShape?  (Read 1779 times)

0 Members and 1 Guest are viewing this topic.

neophobe

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Why use Sprite instead of textured RectangleShape?
« on: June 22, 2013, 06:57:40 pm »
Hello, is there any technical advantage of using the Sprite class instead of just creating a rectangle and applying a texture to it?
« Last Edit: June 22, 2013, 07:51:56 pm by neophobe »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Why use Sprite instead of textured RectangleShape?
« Reply #1 on: June 22, 2013, 08:31:15 pm »
sf::Sprite is more specialized, which means that both its API and its code are optimized for what it does.
Laurent Gomila - SFML developer