There was quite a huge performance gain, everything looked fine, so I started writing the keyboard input functions.
I am polling for events in the main loop, every frame like this:
while (App.PollEvent (Event))
{
//myWorld.myPlayer.handle_input();
//if (Event.Type == sf::Event::Closed)
//{
// App.Close();
//}
}
Even if the loop is empty, like above, the performance drops significantly, the frame rate fluctuates between 20-60.Am I doing the polling wrong?
EDIT:
SOLVED
I got the answer on SFML forums
Can you try to comment line 121 of src/SFML/Window/WindowImpl.cpp (ProcessJoystickEvents();) and recompile SFML?