I started a project a few days ago to get to grips with SFML. When I was working on it then, the main sf::RenderWindow constructor would be called instantly. Now that I've come back to the project, it's taking up to 42 seconds in Debug mode to continue beyond the sf::RenderWindow constructor function.
So whenever I run the console appears and 40 seconds later the RenderWindow will appear.
It can't be my computer specifications as I have a very high end PC.
Here's the code in my main function:
int main()
{
sf::RenderWindow window(sf::VideoMode(960, 640), "proj v0.0.1");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
{
window.close();
}
}
window.clear(sf::Color::Black);
window.display();
}
return 0;
}
I'm honestly just very confused as to why there's such a long delay and it's making testing new features very difficult.
来源:https://stackoverflow.com/questions/50988505/sfml-renderwindow-taking-inconsistent-time-to-display