On Sat, Jun 27, 2009 at 4:24 AM, Gachuk <[email protected]> wrote:
> > Well with my example above i'm not sure if Vsync is enabled, I know if > you create a window then vsync will be by default. > > With Tristam suggestion of updating as fast as possible i.e. with > schedule not schedule_interval and letting vsync control the FPS then > I do get more often than not 16ms. > However I do get an alarming amount of stray 30ms timings, now while > as I said I appreciate you may get some variance, the amount of times > you get 30ms crop up is quite alarming atleast several per second. > > So i'm still at a loss as to what to do, it's quite a limiting problem > because it is preventing me from having smooth animation, which is > kind of important in a game (or in most multimedia apps) A couple of general points: - Accurate timing on Windows is very hard - there is no single time function which works reliably across multiple PCs. QueryPerformanceCounter() skips around on multi-core systems (sometimes even with the thread affinity set), timeGetTime() has hardware-dependant resolution (often very poor) and typically defaults to 5 ms or more - timeBeginPeriod() may or may not help, again depending on the hardware. - VSync has always been slightly borked on windows (again, no fault of pyglet), possibly as a result of the timing issues. It isn't particularly good at yielding the CPU, or maintaining a constant frame time. -- Tristam MacDonald http://swiftcoder.wordpress.com/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
