Windows 8 x64, Visual Studio 2013, Release and Debug build, using static SFML lib.
Usually immediately when I start the program, but sometimes not until after a few clicks, the window will freeze for 7-12 seconds.
This usually happens which I drag the window around, hover over an edge so the resize cursor appears, or hover over any of the window buttons.
int _tmain(int argc, _TCHAR* argv[])
{
sf::RenderWindow *window=new sf::RenderWindow(sf::VideoMode(800, 600), "title");
window->setFramerateLimit(60);
// run the program as long as the window is open
while (window->isOpen())
{
// check all the window's events that were triggered since the last iteration of the loop
printf("start");
sf::Event event;
while (window->pollEvent(event))
{
// "close requested" event: we close the window
if (event.type == sf::Event::Closed)
window->close();
printf("event!");
}
printf("clear");
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Escape))
{
window->close();
}
window->clear();
printf("display");
window->display();
printf("done");
}
delete window;
return 0;
}
the freeze happens somewhere between the "start" and the "event!" but also sometimes between "display" and "done"