LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Daslee on April 02, 2014, 12:04:02

Title: Disabling vsync
Post by: Daslee on April 02, 2014, 12:04:02
Hello. Can someone explain me how to disable vsync on lwjgl in linux ubuntu? I've tried to disable it with this line:

Display.setVSyncEnabled(false);

But it doesn't works. I also tried to disable vsync in compiz and in driconf, but after I disable in driconf, next time I open driconf it's again enabled. I thought it was ubuntu problem, but I tried to launch glxgears and it have over 4k fps, but my game only 60, so maybe it's lwjgl problem?
Title: Re: Disabling vsync
Post by: kappa on April 02, 2014, 13:02:11
It might be forced on in your graphics driver.

However do check it is actually disabled in your app by checking for any stray Display.setVSyncEnabled(boolean) and Display.sync(int) calls.
Title: Re: Disabling vsync
Post by: Daslee on April 02, 2014, 13:08:45
I found something weird, if I'm launching my game in eclipse, then I have vsync enabled and fps is not greater than 60. If I export jar file and make fat jar with jarsplice and then launch my game from terminal like this: java -jar game.jar, then vsync is disabled and fps is greater than 60. And how I could fix that?