Search code examples
c#opentk

How can I set unlimited FPS in OpenTK?


using (OpenTK.GameWindow game = new OpenTK.GameWindow())
{
    double fps = 60;
    game.Run(fps, fps);
}

With this I am able to set the fps to 60 or lower. But I want to have unlimited fps. How can I do this?


Solution

  • using (OpenTK.GameWindow game = new OpenTK.GameWindow())
    {
        double fps = 60;
        game.VSync = OpenTK.VSyncMode.Off;
        game.Run(fps, fps);
    }
    

    That solved it. So easy that I did not think of it:D

    When you set fps now to 0 you get unlimited fps.