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

Author Topic: RectangleShape vs Sprite  (Read 2891 times)

0 Members and 1 Guest are viewing this topic.

wintertime

  • Sr. Member
  • ****
  • Posts: 255
    • View Profile
RectangleShape vs Sprite
« on: October 12, 2013, 08:41:27 pm »
I tried to find the difference between using a RectangleShape and a Sprite by reading the docs, but they seem to have mostly the same functionality, only that a RectangleShape can have a size, an outline and the option to not use a Texture. I assume a Sprite should just get scaled instead of setting a size?
Whats the usecase where a Sprite should be prefered? Is it just a bit more efficient?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: RectangleShape vs Sprite
« Reply #1 on: October 12, 2013, 08:56:23 pm »
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

wintertime

  • Sr. Member
  • ****
  • Posts: 255
    • View Profile
Re: RectangleShape vs Sprite
« Reply #2 on: October 13, 2013, 12:20:28 am »
Well sorry, I had read in the forum often already and several pages deep at that and had not seen such a thread, so it didnt occur to me to use the automatic search for something even older.
I have read those threads now, but the thing with only the shape having a size to be set is still a bit unclear to me. I think I'll try switching to the sprite and see how it works then.

 

anything