On Mar 4, 8:58 pm, "Alex Holkner" <[EMAIL PROTECTED]> wrote:
> On Wed, Mar 5, 2008 at 2:13 AM, Ben Sizer <[EMAIL PROTECTED]> wrote:
> >  Do either of these methods guaranteed to get called as often as they
> >  would if you put them directly into your own game loop?
>
> There's no such guarantee -- if you're ignoring user input and
> rendering something trivial to a single window (worst case for
> EventLoop) you can measure a small performance degradation (you would
> not notice it).  For any app with non-trivial rendering, multiple
> windows, or that responds to mouse events, EventLoop is either not
> measurably different or is more responsive.

I guess what I was worried about is that interrupt-based scheduling is
only as accurate as the resolution of the context switching on the OS
you're on. Asking for something to be polled 75 times a second
typically doesn't get you that many executions, due to sleep() calls
overrunning and so on, whereas putting that in a loop that happens to
be fast enough to execute 75 times a second would be fine.

However, having just looked at clock.py, and seen the effort you've
gone to in order to mitigate this (SetWaitableTimer on Windows,
considering using busy-waits rather than overrunning), I'm reassured
that it would probably work about as well as is possible. I look
forward to testing it soon!

Thanks,
Ben Sizer

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