Err, of course pyglet knows something about frames. What I mean by that is, pyglet has no control over when a frame starts & ends, or when the functions that progress through a normal clear, draw, flip loop are called...
On Nov 30, 10:05 am, stampson <[EMAIL PROTECTED]> wrote: > I guess I'm thinking of it like this...the clock and ticks are loosely > associated with 'frames', which are really just a concept - not a > codified part of pyglet. If it was to be something more rigid and > accurate, it would seem to me to require that pyglet be more in > control over what happens, and would not allow a tick function to be > used as now - pyglet would have to be checking those events on some > quite frequent basis. I'm fairly new to python, so perhaps I'm > overestimating the implications of the change... > > What if the schedule functions had an optional parameter to tick the > clock when called? > > -price > > On Nov 30, 9:23 am, sol <[EMAIL PROTECTED]> wrote: > > > The thing that seems strange / inconsistent to me is that the dt > > reported to the callback is close to the requested duration, but the > > actual amount of elapsed time is not even close to the reported dt. > > > Since, as you point out, the internal OS timer is not actually started > > until the next call to .tick() after the call to schedule_once(), then > > the OS timer duration should be corrected to a value that factors in > > the fact that there may be a time delay between when the schedule_* is > > called and when the next .tick() is called so that the reported dt is > > always, within reason, accurate. > > > Basically it seems that _schedule_item should record the time that the > > schedule_* was called, so that the desired end time of the callback > > can be accurately calculated, even if there is a delay between when > > schedule_* call and the next .tick() call. This way dt passed to the > > callback would always be accurate relative to the actual amount of > > time that has passed. > > > Maybe I'm thinking of this the wrong way though. > > > Thanks. > > > Sol --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
