Stereo sync (swapinterval)
    Vernon Schryver 
    vjs at rhyolite.wpd.sgi.com
       
    Sat Dec  8 15:10:31 AEST 1990
    
    
  
In article <17956 at thorin.cs.unc.edu>, certain at aesop.cs.unc.edu (Andrew Certain) writes:
> I admit it:  I was wrong.  My problem was more complex.  I have
> realized that swapbuffers indeed does block once you try to do a
> graphics call.  I have discovered that my problem was that although
> usually my program could draw the scene in 1/60th of a second,
> sometimes it wouldn't, and the eye would switch....
Could you use gettimeofday(2) or (better to avoid adjtime(2) effects)
times(2) to read the system clock, divide the resulting timestamp by a
number related to 1/60th sec, and depending on the remainder, use sginap(2)
or select(2) to delay a little to get back into sync?  Or maybe just do an
extra swapbuffer to delay?  Or instead of delaying, skip forward to the
correct frame?  If the cause is infrequent enough to make the resulting
artifacts unobjectionable?
Vernon Schryver,   vjs at sgi.com
    
    
More information about the Comp.sys.sgi
mailing list