Yes, that's normal.

The clock only ticks when an event happens or a function is scheduled,
so just doing nothing will give you a low framerate. In practice you
have scheduled functions to keep your app ticking over so this doesn't
happen. The set_fps_limit function I have never understood, it has no
discernable effect.

Richard.

On Aug 25, 8:54 pm, Guillaume Simard <[email protected]> wrote:
> Hi everyone !
>
> I'm new to Pyglet so I'm sorry if this has already been asked.
>
> I created a very simple application displaying a window and the
> current fps.
> Here's the code
>
> -----
>
> import pyglet
>
> w = pyglet.window.Window()
> fps = pyglet.clock.ClockDisplay()
>
> pyglet.clock.set_fps_limit(30)
>
> @w.event
> def on_draw():
>     w.clear()
>     fps.draw()
>
> pyglet.app.run()
>
> -----
>
> When I run the app, the fps is very low - around 7 fps.
> But when I hold a key on the keyboard, the fps increase to about 38
> fps.
> If I move the mouse, the fps increases to about 60 fps.
>
> Is this normal behavior ?
>
> Thanks in advance !
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to