limiting frames

Hello, does panda limit the fps by default and is there a way to limit or raise the number of frames per second?

The following example will limit the frame rate to no faster than 35 frames / sec:

# Lock the maximum frame rate.
globalClock.setMode(ClockObject.MLimited)
globalClock.setFrameRate(35)

By default, vsync is enabled, which caps the FPS to the monitor’s refresh rate. To disable that, use the configuration variable:

sync-video #f

On a related note, is it possible to limit the frame rate of a render-to-texture buffer (made with base.win.makeTextureBuffer) while keeping the frame rate of everything else untouched?

If you only want to render to an offscreen buffer every other frame, you could have a task that calls buffer.setActive(False) and buffer.setActive(True) on alternate frames.

David