Compiling for different 4Ds

Archer Sully archer at elysium.SGI.COM
Thu Mar 16 09:45:58 AEST 1989


In article <8903151747.AA29409 at adt.uucp>, spike at 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 <gl.h>

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 at sgi.com

"life is short, and full of stuff"

		-- Lux Interior
--



More information about the Comp.sys.sgi mailing list