Simulating Transparency using fill patterns on a 4D/25
    Thant Tessman 
    thant at horus.esd.sgi.com
       
    Fri Oct  5 04:13:29 AEST 1990
    
    
  
In article <1990Oct3.144925.12691 at jarvis.csri.toronto.edu>,
corkum at 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 at 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
    
    
More information about the Comp.sys.sgi
mailing list