Hey,
I've got a problem I can make absolutely no sense of. When my game is running, a seemingly
random older frame (from the main menu, item selection, in-game state, whatever...) is popping up occasionally, every few minutes. I can't reproduce the bug, it occurs randomly whether I'm playing with lots of inputs and events going on or just standing around and watching the screen.
I use SFML.Net / C#, but I can't tell whether this problem might be related to the port.
The game loop looks like this, sparing some of the details:
while (Window.IsOpen() && _running)
{
float time = GetTime();
Window.Clear(Color.Black);
Update(time);
Draw();
Window.Display();
Window.DispatchEvents();
}
Nothing too unusual there, right? This is the only place in the code where the
Display() function is called.
It seems to me that the GPU has some old frame stored that is randomly displayed. When using dual monitors, the 2nd screen goes black for a moment when this bug happens.
Any insights on why this is happening or how to fix this are appreciated. I've been gnawing at this bug for days.
Thanks,
David