Skip to content Skip to sidebar Skip to footer

Using Pyglet In Python, Why Does My Frame Rate Speed Up If I Mouse-drag?

I wrote a simple image display using python's pyglet package. On my Linux laptop, the code worked how I expected, displaying a constant 60 frames per second. On my Windows 7 deskto

Solution 1:

Been a while since I did any pyglet, but looking back at some old code, I see it all seems to use a pyglet clock setup with

clock.schedule_interval(self.update,1.0/75.0)   
 clock.set_fps_limit(75)

in a subclassed pyglet Window to take control of the update rate (where update is a window method which advances the game world by a timestep parameter, and invalidates the window). I don't think there is anything in pyglet which particularly guarantees a regular "ticker" update rate otherwise.

Post a Comment for "Using Pyglet In Python, Why Does My Frame Rate Speed Up If I Mouse-drag?"