1
Graphics / Debugging is slow at first. then speeds up
« on: February 02, 2012, 12:07:47 pm »Quote from: "Laurent"
This seems to be a common problem, but it's probably a driver issue. I mean, there is no such code in SFMLCode: [Select]if (debug && (elapsedTime < 10))
runSlow();
else
runFast();
Lets hope there is no code in there like that!
I updated to the latest Nvidia drivers, also updated to the latest SFML 2.
one thing i did notice is this bit of code....
Code: [Select]
oss << playeronehealth;
GameText.SetString(oss.str());
GameText.SetPosition(1100,420);
App.Draw(GameText);
oss.str("");
oss << playeronescore;
GameText.SetString(oss.str());
oss.str("");
GameText.SetPosition(1100,440);
App.Draw(GameText);
if i comment that out it does sit on 100+ fps.
with it in there it sits on 8fps...
This code runs every frame. Is the StringStream that heavy to destroy my framerate???
thanks
Werdy666 :?