On 7/9/08, Ben Sizer <[EMAIL PROTECTED]> wrote:
>
>  On Jul 8, 6:02 pm, altern <[EMAIL PROTECTED]> wrote:
>  > i noticed that CPU usage goes up when the mouse is moved, no matter if
>  > on_mouse_motion is declared or not. In a simple example i am working on
>  > it goes up from 5% to 15%.
>
>
> That isn't surprising, given that there is an event to handle. Even if
>  Pyglet doesn't do anything with it, the application still receives
>  events.
>

It is not the event processing that causes the framerate (and CPU
usage) to increase, it's that the event triggers a repaint.  This is
the default behaviour of the EventLoop class.  You can manually set
Window.invalid = False at the end of the on_draw handler to prevent
this, and then set it to True when you do require a repaint.

Alex.

--~--~---------~--~----~------------~-------~--~----~
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