Hello Guest

LWJGL Wiki/Documentation

  • 3 Replies
  • 8491 Views
LWJGL Wiki/Documentation
« 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!

Re: LWJGL Wiki/Documentation
« Reply #1 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().

Re: LWJGL Wiki/Documentation
« Reply #2 on: October 29, 2008, 13:43:23 »
That means that Display.sync() is used manually in case of Display.setVsyncEnabled() is false...?

Re: LWJGL Wiki/Documentation
« Reply #3 on: October 30, 2008, 10:42:57 »
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.
« Last Edit: October 30, 2008, 10:48:31 by Ciardhubh »