Is it possible to disable frame-limiting in libGDX?

前端 未结 3 1291
迷失自我
迷失自我 2021-02-07 10:15

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

3条回答
  •  庸人自扰
    2021-02-07 10:45

    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.

提交回复
热议问题