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