There is one catch to using vsync that not many know about. This illustrates it pretty well:<br><br>[gemwin 60] with pix_movie playing back a 29.97 fps DV clip:<br><br>print: 6.001<br>print: 27.532<br>print: 5.823<br>print:
27.144<br>print: 6.313<br>print: 27.383<br>print: 5.992<br>print: 28.492<br>print: 4.613<br>print: 29.411<br>print: 3.936<br>print: 28.189<br><br>Note that every other frame pattern. Why is that? The low number is probably a fairly accurate number for the CPU to fetch the frame from disk, decode and then fling it up onto the GPU for texturing, but what about the other number? Add the two numbers together and they are almost exactly the time for two frames to render (about 33 ms at 60fps). The reason is that the driver will wait on the 'no load' frame for the next sync before returning which is why it runs too long.
<br><br>On 10/12/07, <b class="gmail_sendername">cyrille henry</b> <<a href="mailto:cyrille.henry@la-kitchen.fr">cyrille.henry@la-kitchen.fr</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
gemhead 50<br> |<br>t b b<br> | |<br>realtime<br> |<br>print<br><br>you should have only 50.<br>what i've got is :<br><br>print: 46.48<br>print: 52.183<br>print: 52.213<br>print: 46.474<br>print: 52.186<br>print: 46.505
<br>print: 52.192<br>print: 52.179<br>print: 46.512<br>print: 52.174<br>print: 52.209<br>print: 46.484<br>print: 52.179<br>print: 46.512<br>print: 52.159<br><br>(with audio off, nothing else than the gemwin and this 4 object in the patch)
<br><br>this jitter make it impossible to compute 1 and only 1 frame for each frame on the screen, even with sync on vblank.</blockquote><div><br> </div><br></div><br>