LWJGL Wiki/Documentation

Started by PressureDrop, October 29, 2008, 11:13:43

Previous topic - Next topic

PressureDrop

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!

Ciardhubh

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().

PressureDrop

That means that Display.sync() is used manually in case of Display.setVsyncEnabled() is false...?

Ciardhubh

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.