home *** CD-ROM | disk | FTP | other *** search
- 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
- From: bam@rudedog.asd.sgi.com (Brian McClendon)
- Newsgroups: comp.sys.sgi
- Subject: Re: Possessed Mice and Reality Engines
- Message-ID: <1gan2vINN6aq@fido.asd.sgi.com>
- Date: 11 Dec 92 18:36:15 GMT
- References: <LAU.92Dec10121624@sunset.ai.sri.com> <1992Dec11.122428.11674@news.uni-stuttgart.de>
- Distribution: comp
- Organization: Silicon Graphics, Inc., Mountain View, CA
- Lines: 41
- NNTP-Posting-Host: rudedog.asd.sgi.com
-
- In article <1992Dec11.122428.11674@news.uni-stuttgart.de> andreas@awstar.rus.uni-stuttgart.de (Andreas Wierse) writes:
- >In article <LAU.92Dec10121624@sunset.ai.sri.com> lau@sunset.ai.sri.com (Stephen Lau) writes:
- >>
- >#include <gl.h>
- >#include <device.h>
- >
- >main()
- >{
- > noport();
- > winopen("free my mouse");
- >
- > setvaluator(MOUSEX,800,0,1599);
- > setvaluator(MOUSEY,600,0,1199);
- >}
- >
- >(I just type it out of my head, maybe it doesn't compile directly, but
- >the setvaluator call is that does it. Just checked it, it works for me)
- >
- >
- >As far as I remember, setvaluator didn't work for some early 4.0.X
- >releases, but with 4.0.5F it's definitely ok again. In the good old 3.X
- >days, gclear used to set the mouse free again, but this doesn't work
- >since 4.0. :-(
- >
-
- gexit apparently used to do a setvaluator to restore defaults, but that
- behavior disappeared in 4.0 (it wasn't documented). gclear called this,
- but most GL apps never seem to. I added the calls to gclear for the
- next release of IRIX:
- setvaluator(MOUSEX,getgdesc(GD_XPMAX)/2, 0, getgdesc(GD_XPMAX));
- setvaluator(MOUSEY,getgdesc(GD_YPMAX)/2, 0, getgdesc(GD_YPMAX));
-
- This works no matter what the screen resolution is. My search of SGI
- src code discovered a few uses of the, now crufty, XMAXSCREEN/YMAXSCREEN
- defines from gl.h when calling setvaluator. Showcase, some demos, and
- a confidence test are the only programs shipping to customers that still
- have it.
- --
- ----------------------------------------------------------------------------
- Brian McClendon bam@sgi.com 415-390-1110
- ----------------------------------------------------------------------------
-