XOR mode

Kurt Akeley kurt at cashew.asd.sgi.com
Thu Jun 28 01:39:36 AEST 1990


In article <1990Jun27.040030.17013 at calgary.uucp>,
paquette at cpsc.ucalgary.ca (Trevor Paquette) writes:


|> 
|>   Is there a cheap and dirty way to get XOR mode when doing a draw(),
|>  sboxf() or even bgnline()..endline()? I am porting an application that
|>  uses alot of the sunview 'PIX_SRC|PIX_DST' modes when writing to the
|>  screen. As far as I know about the sgi there is no 'built in' XOR
|>  mode for doing lines and/or block writes. I really don't want to write
|>  my own bres' algorithm for lines, checking for pixels along the way
|>  and XORing them myself, nor do I want to do that for each pixel in a 
|>  block write.
|>    Can this be done easily? or should have have another go through the
|>  manuals and see what I missed.
|>  Trev

The GL command logicop() allows any of the 16 logical operations to be
specified for all drawing commands (points, lines, polygons, surfaces,
characters, etc.).  Even the syntax PIX_SRC|PIX_DST is supported:

    logicop (LO_SRC | LO_DST);

However, logicop is supported only by the newer hardware platforms.
You can use the command

    getgdesc(GD_LOGICOP)

to determine whether logicop is supported on a given machine.  I believe
that the Personal Iris with the RE2 chip, recently shipped GT/GTX
systems with no alpha bitplanes, and VGX systems are the only machines that
support logicop().

-- kurt



More information about the Comp.sys.sgi mailing list