The critical thing is that if you want async calls to the opengl flip / swap buffers, make sure that your last flip has actually occurred on the video card before you issue another flip. If the flip is async then the flip return time is almost for sure not locked to the start of the next retrace (sorry if I'm stating the obvious here). If there is already an async flip pending and you call flip again, then opengl will not return from the second flip call until the first flip has occurred. This is what results in what may 'appear' to be a 'synced' async flip call, however it will actually be delayed almost 1 retrace. ;)
Also, the above means that if you want to try to get the retrace start time from software, you should not be using the flip return time, but instead other methods, like scan position polling if available on your OS / video card driver. All the above is really only useful if you are driving a CRT monitor. All LCDs we have ever tested have extra buffers and delays so that there is no real way to get msec accurate display change info from a software level. This also seems to be common in DLP projectors, but we have not tested as much. In terms of what the 'right' time to call flip within a retrace is, this really depends on your goal. If you are updating the display based on a real-time continuous input stream, like eye data, then it is ideal to wait as long as possible before updating the back buffer and flipping so you are using the most recent data. As Andrew mentions though, the longer you wait, the higher the chance of missing the intended retrace. If you are updating based on some predefined 'deterministic' time intervals or something, then I do not see why you would not want to start drawing your next display to the back buffer right after you flip for the previous one. You can then wait and call flip at the beginning of the retrace prior to the desired display time, which is very quick so you minimize any chances of missing the desired retrace. 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 -~----------~----~----~----~------~----~------~--~---
