LWJGL Forum

Programming => LWJGL Documentation => Topic started by: PressureDrop on October 29, 2008, 11:13:43

Title: LWJGL Wiki/Documentation
Post by: PressureDrop on October 29, 2008, 11:13:43
Hi,

how actual is your wiki and the documentation in relation to LWJGL version 2??? How actual is the skeleton code described in your wiki? Is Display.sync() the right choice to wait for the vsync? If it`s not actual, could you post a skeleton code for a game?

Thanks in advance!
Title: Re: LWJGL Wiki/Documentation
Post by: Ciardhubh on October 29, 2008, 13:32:58
You don't have to wait for vsync. If you enable vsync with Display.setVsyncEnabled(true), it will automatically handle synchronisation when you call Display.update().
Title: Re: LWJGL Wiki/Documentation
Post by: PressureDrop on October 29, 2008, 13:43:23
That means that Display.sync() is used manually in case of Display.setVsyncEnabled() is false...?
Title: Re: LWJGL Wiki/Documentation
Post by: Ciardhubh on October 30, 2008, 10:42:57
Quote from: PressureDrop on October 29, 2008, 13:43:23
That means that Display.sync() is used manually in case of Display.setVsyncEnabled() is false...?

Why do you want to do Vsync manually? Can it even be done reliably? setVsyncEnabled() enables Vsync that is most likely handled by the driver (I followed calls up to some native calls; I've stopped there though).

Display.sync() is useful if you want to sync to a certain framerate (e.g. 30 FPS) for game-logic reasons. At least that is how I see it.