Panda3d + 120Hz Monitor + vsync


I want to create a little animation that should be shown with real 120 Hz onto one of the new 120 Hz screens. In order to avoid artifacts while displaying the screen I have turned on vsync, but Panda3d only uses the framerate 60 Hz although the display and driver are configured correctly. Does Panda3d support 120 Hz technology and how should I activate it?


Hi, welcome to the forums!

By default, Panda3D has video synchronisation enabled, this means that Panda3D won’t render faster than your monitor’s refresh rate (usually around 60 Hz).

You should try disabling video synchronisation by setting this configuration variable (in the Panda3D/etc/Config.prc directory on your system):

sync-video 0

That should remove the 60 Hz framerate cap.


from pandac.PandaModules import ClockObject
FPS = 120
globalClock = ClockObject.getGlobalClock()

as found here

Does this give artifacts?

I don’t think this is what the OP is asking for. He wants Panda to sync to video rate, which should be 120 fps.

Assuming the driver does indeed support 120fps video rate, then Panda can render at that rate, as long as your frame time is no longer than 1/120 s. It certainly ought to be with nothing in the scene.

There’s nothing in Panda that knows anything about 60fps or any other hardcoded rate; if I set my display to 72fps it happily syncs at 72fps. I can’t set my display faster than that, of course, but if I could Panda would sync to it.

If Panda’s still syncing at 60fps, it means that either (a) your frame time is longer that 1/120s, or (b) your driver does not allow applications to sync at faster than 60fps. You can test (a) by examining the frame time in PStats.

Note that you shouldn’t be mucking with the global clock settings in order to guarantee video sync.


It seems desabled:


I tried to enable it with sync-video 1

from direct.showbase.ShowBase import ShowBase
from panda3d.core import loadPrcFileData

configVars = """
win-size 1280 720
show-frame-rate-meter 1
sync-video 1

loadPrcFileData("", configVars)

class Platformer(ShowBase):
    def __init__(self):
        self.set_background_color(0.2, 0.2, 0.2, 1.0)

game = Platformer()