Frame rate cap

Hi guys, I wanted to know if there is a way to cap the FPS in an OptiX app to, let’s say, 30FPS instead of 60.

Thanks in advanced!

OptiX doesn’t cap the framerate or even assume you’re displaying the result, so it should be very easy to add your own by choosing when to launch, or when to display. If you are using glfw in your app, for example, you might use glfwSwapInterval() to control waiting for vsync. If it defaults to 60, then you might use a timer to check, and skip every other update in order to get 30 fps. If you want an arbitrary framerate not tied to vsync, you can add a timer & wait to your host side render loop.

Note the NVIDIA control panel has vsync settings, which by default will cap your applications to 60 fps or whatever your display is doing. I always turn that off so I can see how fast the application renders natively.


David.