From: Yair Kurzion (yair++at++polygon.engr.sgi.com)
Date: 01/11/2000 13:25:47
> I need to know the exact time when the graphics card swaps the buffers by
> following method:
>
> glXSwapBuffers
> glXWaitVideoSyncSGI
>
> The glXSwapBuffers only issues the command to swap the buffers and returns
> immediately before the buffers are actually swapped. The command will be
> completed during the next vertical retrace. So, after glXSwapBuffers
> returns, the program calls glXWaitVideoSyncSGI to determine the vertical
> retrace.
>
> Now the problem is that when the glXSwapBuffers returns, sometimes the
> vertical retrace occurs, the graphics card swaps the buffers before the
> program calls glXWaitVideoSyncSGI. Therefore the returning time of
> glXWaitVideoSyncSGI will be one frame later then the actual swapping time
> of the buffers.
>
> Any good method to resolve the problem? Is there any method to access the
> codes that determine the actual swapping of the buffers?
Instead of glXWaitVideoSyncSGI, call
glNormal3f(0.0f, 1.0f, 0.0f);
(Or any other OpenGL call). This will block until swapbuffers, and will not
wait an extra frame as in your case.
-yair
--
\_________ \_____ \__ \__ \_____ Yair Kurzion
\_________ \_____ \__ \__ \_____ yair++at++sgi.com
\__ \__ \____\__ \__ http://reality.sgi.com/yair
\__ \__ \__ Work: (650) 933-6502
\__ \__ \__ Home: (408) 226-9771
\__ \__ \__
This archive was generated by hypermail 2b29 : Tue Jan 11 2000 - 13:25:53 PST