Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!sgi!shinobu!odin!cashew.asd.sgi.com!kurt From: kurt@cashew.asd.sgi.com (Kurt Akeley) Newsgroups: comp.sys.sgi Subject: Re: XOR mode Message-ID: <9579@odin.corp.sgi.com> Date: 27 Jun 90 15:39:36 GMT References: <1990Jun27.040030.17013@calgary.uucp> Sender: news@odin.corp.sgi.com Reply-To: kurt@cashew.asd.sgi.com (Kurt Akeley) Organization: sgi Lines: 34 In article <1990Jun27.040030.17013@calgary.uucp>, paquette@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