SFML community forums
Help => General => Topic started by: alexaz on November 04, 2011, 12:07:11 pm
-
Hey guys,
i am wondering whether creating text element every frame is a viable option, this is what i mean:
void OnDraw(){
sf::Text text("The quick brown fox jumps over the lazy dog.", font, 72);
text.SetPosition(30.0f, 40.0f);
window->Draw(text);
}
-
Currently, it makes no difference (nothing is precomputed internally in sf::Text). But with the new graphics API that I'm working on, it will probably be better to initialize the sf::Text instance once, if it's never going to change.
-
Oh, okay. Thanks for the quick response by the way!