void displayText(const std::string & text, sf::RenderWindow & window, const sf::Vector2f & position = sf::Vector2f(0, 0), const short & size = 30, const sf::Color & color = sf::Color::White)
{
sf::Text t(text, sf::Font::getDefaultFont(), size);
t.setPosition(position);
t.setColor(color);
window.draw(t);
}
Is there a faster way to replicate the functionality of this function, or is this the best way to output text? Whenever I call this function it drops my framerate by about 300 fps. How can I improve this or what alternatives are available? I've gone through the documentation and have not found anything (although I certainly could have missed something).