Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
Cost of sf::Sprite and sf::Text
Print
Pages: [
1
]
Author
Topic: Cost of sf::Sprite and sf::Text (Read 1678 times)
0 Members and 1 Guest are viewing this topic.
svrtgujbhk
Newbie
Posts: 20
Cost of sf::Sprite and sf::Text
«
on:
April 11, 2011, 09:52:19 pm »
I'm curious how expensive it is to create sf::Sprite and sf::Text object from already existing sf::Image and sf::Font. Do they just keep a pointer to these objects or is there some more costly process going on?
Logged
Nexus
SFML Team
Hero Member
Posts: 6287
Thor Developer
Cost of sf::Sprite and sf::Text
«
Reply #1 on:
April 11, 2011, 10:05:06 pm »
Yes, the classes sf::Sprite, sf::Text, sf::Sound are just lightweight frontends to the heavyweight resources sf::Image, sf::Font, sf::SoundBuffer.
Logged
Zloxx II
: action platformer
Thor Library
: particle systems, animations, dot products, ...
SFML Game Development
:
Grimshaw
Hero Member
Posts: 631
Nephilim SDK
Cost of sf::Sprite and sf::Text
«
Reply #2 on:
April 11, 2011, 10:05:47 pm »
It is actually as light as it looks
Sprites are ultra-fast except if you consider that they are individual quads being drawn, which slows down the process
Logged
Indie game developer -
http://daevatheory.com/
Engine -
https://github.com/DevilWithin/Nephilim
http://www.packtpub.com/sfml-game-development/book
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
Cost of sf::Sprite and sf::Text