SOLUTION:
Updated csfml libraries to 2.5. issue disappeared
Hey fellow Devs,
So I'm working on a project in SFML.NET and I did the standard sfml game loop:
while (_renderer.Window.IsOpen)
{
totalTimeElapsed = clock.ElapsedTime.AsSeconds();
deltaTime = totalTimeElapsed - previousTimeElapsed;
totalTimeBeforeUpdate += deltaTime;
if (totalTimeBeforeUpdate >= Renderer.TIME_TO_UPDATE)
{
_renderer.Window.DispatchEvents();
_time.Update(totalTimeBeforeUpdate, clock.ElapsedTime.AsSeconds());
_renderer.Clear();
Update(_time);
Draw(_time);
fps.DisplayedString = (1.0f / totalTimeBeforeUpdate).ToString();
_renderer.Window.Draw(fps);
_renderer.EndDraw();
totalTimeBeforeUpdate = 0f;
}
previousTimeElapsed = totalTimeElapsed;
}
but I'm getting some strange 'slower' frames, every second or so, Window.DispatchEvents() is taking much longer to run (0.1s vs the normal 0.01s) which causes the application to be jittery... I've tried removing all of my event bindings and this is still happening...
Does anyone know why it might be the case?