Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!decwrl!sgi!shinobu!odin!horus.esd.sgi.com!thant From: thant@horus.esd.sgi.com (Thant Tessman) Newsgroups: comp.sys.sgi Subject: Re: Graphics library examples Message-ID: <5074@odin.SGI.COM> Date: 9 Mar 90 15:47:03 GMT References: <9003082054.aa06458@VMB.BRL.MIL> Sender: news@odin.SGI.COM Reply-To: thant@horus.esd.sgi.com (Thant Tessman) Organization: Silicon Graphics, Entry Systems Division Lines: 37 In article <9003082054.aa06458@VMB.BRL.MIL>, butler@BRL.MIL ("Lee A. 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: > > #include > > main() > { > prefposition(100, 500, 200, 600); > shademodel(FLAT); > winopen("red"); > color(RED); > clear(); > sleep(5); > } > ... > > I noticed that if you leave out the call to "shademodel" the program works > as advertised. > > Lee A. Butler > SLCBR-VL-V Internet: butler@brl.mil > Ballistic Research Laboratory Phone: (301) 278-8740 > Aberdeen Proving Grounds, MD 21005-5066 There is an error in the program. The 'winopen' needs to happen befor the 'shademodel' command. I think (hope) the manual has been fixed by now. Some commands (like prefposition) are hints, and go before the winopen. All the rest need to happen after the graphics have been initialized. thant