home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / sgi / hardware / 96 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  1.6 KB

  1. Path: sparky!uunet!mcsun!sun4nl!tuegate.tue.nl!rw7.urc.tue.nl!wmbfmk
  2. From: wmbfmk@rw7.urc.tue.nl (Marc van Kempen)
  3. Newsgroups: comp.sys.sgi.hardware
  4. Subject: Re: From where do I get a SYNC signal?
  5. Message-ID: <wmbfmk.726540994@rw7.urc.tue.nl>
  6. Date: 9 Jan 93 00:56:34 GMT
  7. References: <C0HwKH.62D@cmcl2.nyu.edu>
  8. Sender: root@tuegate.tue.nl
  9. Reply-To: wmbfmk@urc.tue.nl
  10. Lines: 37
  11.  
  12. dario@cns.nyu.edu (Dario Ringach, x3941) writes:
  13.  
  14. >I'd like to synchronize the screen refresh with external equipment for
  15. >a psychophysical experiment...  I only want a signal coincident with
  16. >the FIRST vertical SYNC of the monitor AFTER I call swapbuffers() (i.e.
  17. >exactly when the buffers are swapped).  Is there a way to do this?
  18. >Thank you!
  19.  
  20. From the man page of GSYNC():
  21.  
  22. In some implementations gsync blocks immediately. In others, gsync
  23. blocks only when a graphics call is made.
  24.  
  25. I think swapbuffers() does the same. It allows your program to continue
  26. unless it performs a graphics function that would affect the
  27. current frontbuffer, that is: after the call to swapbuffers, but before
  28. the buffers have actualy been 'swapped'.
  29.  
  30. Maybe you should include a line in your code like:
  31.  
  32. unsigned long dummy;
  33.  
  34. swapbuffers();
  35. lrectread(0,0,0,0,&dummy);
  36.  
  37. This should block your program until the next vertical retrace.
  38.  
  39.  
  40. If your interested, I've written some (dirty) code that directly uses the
  41. vertical retrace interupt adress. It only works on IP12 boards
  42. though (Indigo-Elan, Iris). I'll post it if anybody can use it.
  43.  
  44.  
  45. Marc.
  46.  
  47. BTW: can anybody at Silicon tell my if they have figured out what causes
  48. my Indigo-Elan to hang in PAL mode?
  49.