Path: utzoo!attcan!uunet!know!zaphod.mps.ohio-state.edu!wuarchive!decwrl!sgi!shinobu!odin!horus.esd.sgi.com!thant From: thant@horus.esd.sgi.com (Thant Tessman) Newsgroups: comp.sys.sgi Subject: Re: Simulating Transparency using fill patterns on a 4D/25 Message-ID: <1990Oct4.181329.10277@odin.corp.sgi.com> Date: 4 Oct 90 18:13:29 GMT References: <1990Oct3.144925.12691@jarvis.csri.toronto.edu> Sender: news@odin.corp.sgi.com (Net News) Reply-To: thant@horus.esd.sgi.com (Thant Tessman) Organization: Silicon Graphics Inc. Lines: 53 In article <1990Oct3.144925.12691@jarvis.csri.toronto.edu>, corkum@csri.toronto.edu (Brent Thomas Corkum) writes: > > A while back someone told me that you could simulate transparency on > a 4D/25 by using fill patterns on polygons, and making the > background transparent. What I want to know is has anyone done > this and what parameters to what gl routines do I need to use. > > Brent Corkum > corkum@csri.toronto.edu See 'defpattern' and 'setpattern.' #define HALFTONE 1 #define QUARTERTONE 2 short halftone[] = { 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, }; short quartertone[] = { 0x1111, 0x0000, 0x4444, 0x0000, 0x1111, 0x0000, 0x4444, 0x0000, 0x1111, 0x0000, 0x4444, 0x0000, 0x1111, 0x0000, 0x4444, 0x0000, }; main() { /*...*/ defpattern(HALFTONE, 16, halftone); defpattern(QUAETERTONE, 16, quartertone); /*...*/ setpattern(HALFTONE); draw_half_transparent_thing(); /* etc */ } Good luck, thant