Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Why sprites?
Print
Pages: [
1
]
Author
Topic: Why sprites? (Read 2364 times)
0 Members and 1 Guest are viewing this topic.
kekie
Newbie
Posts: 5
Why sprites?
«
on:
October 13, 2016, 04:22:15 am »
Why would one use a
sf
::
Sprite
instead of a
sf
::
RectangleShape
Reading the graphics module tutorial doesn't reveal any obvious difference between the two?
Logged
DarkRoku12
Full Member
Posts: 203
Lua coder.
Re: Why sprites?
«
Reply #1 on:
October 13, 2016, 05:33:17 am »
RectangleShape have few more methods.
But i think sf::Sprite its more intuitive.
Logged
I would like a spanish/latin community...
Problems building for Android? Look here
kekie
Newbie
Posts: 5
Re: Why sprites?
«
Reply #2 on:
October 13, 2016, 06:21:49 am »
Yeah, RectangleShapes can do just straight colors with borders, and sprites have to be textured it seems. Are there any other differences?
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Re: Why sprites?
«
Reply #3 on:
October 13, 2016, 07:20:26 am »
sf::Sprite is more focused on displaying a textured quad, so it is a little more efficient than sf::RectangleShape at doing it.
Logged
Laurent Gomila - SFML developer
kekie
Newbie
Posts: 5
Re: Why sprites?
«
Reply #4 on:
October 14, 2016, 05:39:10 am »
Ahh - that makes sense. Thanks!
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Why sprites?