Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!arisia!sgi!archer@elysium.SGI.COM From: archer@elysium.SGI.COM (Archer Sully) Newsgroups: comp.sys.sgi Subject: Re: Compiling for different 4Ds Message-ID: <28776@sgi.SGI.COM> Date: 15 Mar 89 23:45:58 GMT References: <8903151747.AA29409@adt.uucp> Sender: daemon@sgi.SGI.COM Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 43 In article <8903151747.AA29409@adt.uucp>, spike@adt.UUCP (Joe Ilacqua) writes: > > Is there any way within the C Preprocessor to tell whether we > are compiling on at Personal Iris or a 4D/70g ? I need to know If I > can use rectread() or if I must use readpixels(). A way to find out > at run time could be useful also. The number of pixels read at any > one time is small so I could use readpixels() if I had to, but > rectread is 10 times faster... > > Joe Ilacqua, > Associative Design Technology You can get the information about the what kind of graphics you are on from gversion at run time. There is a man page on it, but a quick summary might look like this: #include main() { char version[12]; noport(); winopen(""); gversion(version); printf("%s\n",version); } the output of this program will look something like this: GL4D-x.x on a 4D/70G GL4DGT-x.x on a GT or GTX GL4DPI-x.x on a Personal Iris where x.x is the release of the OS that you are running on. Archer Sully archer@sgi.com "life is short, and full of stuff" -- Lux Interior --