Re: How to receive the Vertical Retrace Interrupt.

New Message Reply Date view Thread view Subject view Author view

JAVIER CASTELLAR (javier++at++mar.madrid.sgi.com)
Fri, 3 Feb 1995 22:56:25 -0800


Hi,

        You can do it in two ways from GL:

1) Use the famous SUPER JOHN ROHLF skyfly trick:
(it will sync the code flux to the next vertical retrace, beleave it or not)

                c3i(no_matter_which_color_put_here);

2) Use the most dark GL call you have ever seen
(out of the mistery which has the ilbuffer())

                gsync();

3) In OpenGL, on the new extensions added in 5.3 you have also glVSync_EXT or
glVSync_SGI or something like it. (i cannot remember it, it is friday).

        glVSync*

----------------------------------oooooo-------------------------------------

        Since 2) is on the GL API, use it. Anyway i have used 1) which works.
See 4Dgifts skyfly.c source code.

The manual page for gsync is:

mar 12% man gsync

gsync(3G) gsync(3G)

NAME
     gsync - waits for a vertical retrace period

C SPECIFICATION
     void gsync()

PARAMETERS
     none

DESCRIPTION
     In single buffer mode, rapidly changing scenes should be synchronized
     with the refresh rate. gsync blocks graphics calls to the current window
     until the next vertical retrace period.

SEE ALSO
     singlebuffer

NOTES
     This routine is available only in immediate mode.

     In some implementations gsync blocks immediately. In others, gsync
     blocks only when a graphics call is made.

Hope this helps.

-Javier

-- 
********************************************************************
*  Javier Castellar     * Email:	javier++at++madrid.sgi.com      *
*  Systems Engineer	* Vmail:	x59665                     *
*     	   Gfx guru     * Phone:	++34-1-4429077             *
* Silicon Graphics Spain* Fax:		++34-1-4420150             *
********************************************************************
  Nobody said that the life was a fair play
				Javier Castellar

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:56 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.