Hey i come up to a problem and i have no idea how to fix it, The problem is that i want to draw fps on the screen and it does so. But it seems that i does that multiple times . I think i have to reset the text.setString, It look like this:
http://postimg.org/image/jg2f2zxm7/My code:
ostringstream ss;
sf::Text text;
text.setFont(font);
text.setCharacterSize(15);
text.setColor(sf::Color::Red);
text.setStyle(sf::Text::Bold);
text.setPosition(0,0);
//inside gameloop
//window.clear()
ss << "FPS: " << fps;
text.setString(ss.str())
window.draw(text);
//window.display()