home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / sgi / 17848 < prev    next >
Encoding:
Internet Message Format  |  1992-12-11  |  2.2 KB

  1. Path: sparky!uunet!mcsun!sunic!lunic!eru.mt.luth.se!enterpoop.mit.edu!deccrl!caen!zaphod.mps.ohio-state.edu!darwin.sura.net!sgiblab!sgigate!sgi!fido!rudedog.asd.sgi.com!bam
  2. From: bam@rudedog.asd.sgi.com (Brian McClendon)
  3. Newsgroups: comp.sys.sgi
  4. Subject: Re: Possessed Mice and Reality Engines
  5. Message-ID: <1gan2vINN6aq@fido.asd.sgi.com>
  6. Date: 11 Dec 92 18:36:15 GMT
  7. References: <LAU.92Dec10121624@sunset.ai.sri.com> <1992Dec11.122428.11674@news.uni-stuttgart.de>
  8. Distribution: comp
  9. Organization: Silicon Graphics, Inc., Mountain View, CA
  10. Lines: 41
  11. NNTP-Posting-Host: rudedog.asd.sgi.com
  12.  
  13. In article <1992Dec11.122428.11674@news.uni-stuttgart.de> andreas@awstar.rus.uni-stuttgart.de (Andreas Wierse) writes:
  14. >In article <LAU.92Dec10121624@sunset.ai.sri.com> lau@sunset.ai.sri.com (Stephen Lau) writes:
  15. >>
  16. >#include <gl.h>
  17. >#include <device.h>
  18. >
  19. >main()
  20. >{
  21. >  noport();
  22. >  winopen("free my mouse");
  23. >  
  24. >  setvaluator(MOUSEX,800,0,1599);
  25. >  setvaluator(MOUSEY,600,0,1199);
  26. >}
  27. >
  28. >(I just type it out of my head, maybe it doesn't compile directly, but
  29. >the setvaluator call is that does it. Just checked it, it works for me)
  30. >
  31. >
  32. >As far as I remember, setvaluator didn't work for some early 4.0.X
  33. >releases, but with 4.0.5F it's definitely ok again. In the good old 3.X
  34. >days, gclear used to set the mouse free again, but this doesn't work
  35. >since 4.0. :-(
  36. >
  37.  
  38. gexit apparently used to do a setvaluator to restore defaults, but that
  39. behavior disappeared in 4.0 (it wasn't documented).  gclear called this,
  40. but most GL apps never seem to.  I added the calls to gclear for the
  41. next release of IRIX:
  42.         setvaluator(MOUSEX,getgdesc(GD_XPMAX)/2, 0, getgdesc(GD_XPMAX));
  43.         setvaluator(MOUSEY,getgdesc(GD_YPMAX)/2, 0, getgdesc(GD_YPMAX));
  44.  
  45. This works no matter what the screen resolution is.  My search of SGI
  46. src code discovered a few uses of the, now crufty, XMAXSCREEN/YMAXSCREEN
  47. defines from gl.h when calling setvaluator.  Showcase, some demos, and
  48. a confidence test are the only programs shipping to customers that still
  49. have it.
  50. -- 
  51. ----------------------------------------------------------------------------
  52.  Brian McClendon                  bam@sgi.com                  415-390-1110
  53. ----------------------------------------------------------------------------
  54.