Search code examples
javalibgdxframe-rate

Is it possible to disable frame-limiting in libGDX?


More specifically, a desktop libGDX-LWJGL application. There are configurations options to disable CPU syncing as well as vsynching, but regardless the application runs at 60fps.

This is fine for all practical uses - but out of curiousity if nothing else, I'd like to see how high the framerate could go.


Solution

  • Rode Hyde's answer is no longer correct due to changes in the library. Try this:

    LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
    config.vSyncEnabled = false; // Setting to false disables vertical sync
    config.foregroundFPS = 0; // Setting to 0 disables foreground fps throttling
    config.backgroundFPS = 0; // Setting to 0 disables background fps throttling
    

    Also, make sure any hardware vsync is off on your GPU, if possible, as @RodHyde mentioned.