corkum@csri.toronto.edu (Brent Thomas Corkum) (10/04/90)
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
thant@horus.esd.sgi.com (Thant Tessman) (10/05/90)
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