2
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?

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982
Jan Haha
  • 67
  • 1
  • 8

2 Answers2

2
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.

Jan Haha
  • 67
  • 1
  • 8
0

OpenTK has 3 overloads for the method Run.

You can just use game.Run() without any parameters and will use unlimited fps.

Docs: https://opentk.net/api/OpenTK.GameWindow.html#OpenTK_GameWindow_Run

Cheers

DiegoRibeiro
  • 81
  • 1
  • 6