Graphics library examples

"Gary S. Moss", VLD/VMB moss at BRL.MIL
Sat Mar 10 00:04:16 AEST 1990


[Lee Butler writes:]
< This evening I sat down at the IRIS to start learning to use the graphics
< library. On page 1-5 of the "Graphics Library Programming Guide" is the
< program "red.c" which I typed in verbatim:
< ...
<         shademodel(FLAT);
<         winopen("red");

Lee,
	This has been brought up before, the documentation is wrong, shade-
model() must be called *after* winopen().  I suggested that the GL should
protect itself against this by returning failure from shademodel(), with
a useful diagnostic, but apparently it tries to reference window structures
through an uninitialized pointer.  The last word that I heard from SGI was
that they are considering providing a debuging version of the GL which does
some checking so that they don't have to impact the performance of the
graphics routines.  You should be able to dig up this discussion a month
or so ago in the archives.



More information about the Comp.sys.sgi mailing list