Problem
When I minimize the LWJGL display, the frame rate is no longer capped to 60 frames-per-second with VSync enabled.
How To Reproduce
I wrote the following code that should trigger the bug.
Display.setVSyncEnabled(true);
try {
Display.create();
} catch (LWJGLException e) {
e.printStackTrace();
}
while (!Display.isCloseRequested()) {
Display.update();
}
Display.destroy();
Environment
Java Version: 1.7.0_02
Operating System: Windows 7 x64
LWJGL Version: 2.8.4
I'm surprised you would expect that to work. The thing you probably want to do is to check Display.isActive() and if it returns false, just sleep for 30ms or something.
I did expect it to work. Is it then not a bug? Thanks for the suggested fix.
It is indeed not a bug - if the window is minimised there's no display to vsync to.
Cas :)
Oops. Sorry Caspian. :(