Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ptsfa!well!ewhac
From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab)
Newsgroups: comp.sys.amiga
Subject: Re: rp.Mask and fast graphics
Keywords: Mask
Message-ID: <4763@well.UUCP>
Date: 17 Dec 87 22:46:16 GMT
References: <1593@ssc-vax.UUCP>
Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab)
Organization: Relax.  You're quite safe here.
Lines: 38

In article <1593@ssc-vax.UUCP> coy@ssc-vax.UUCP (Stephen B Coy) writes:
:In the RastPort structure there is a byte
:called Mask which masks off which bitplanes are "drawable" and which
:aren't.  What I'd like to know is how deep into the various drawing
:routines is this looked at.  ie on a 5-bit deep screen if I want to
:do a RectFill in color 4 and I know that the screen is blank (all 0)
:do I gain much by setting rp.Mask = 0x04 before making the RectFill
:call?

	Yup.  The RectFill() call (assuming I'm reading Dale's mind
correctly) will blit into all the planes of the destination.  This includes
zeros.  So setting the RastPort.Mask field will gain you something.  Exactly
how much you will gain depends on how large the rectangle is.

:I'd be quite disappointed if I found that the blitter is set up for each
:bit plane and then the mask byte is looked at.

	You'd lose compute time, yes.  But the real time-sink is the actual
rendering by the blitter.  So you'd still win.  Masks are observed as far
down as BltBitMap(), the work-horse of the rendering system.

:Also, how about
:WritePixel?  I know the savings on this won't be much but at times
:just about anything is useful.
:
	I think the savings on this one are almost negligible, but yes, the
mask field works with this one, too.

:Thanks in advance for any useful insights.
:
	It's nice to see someone else thinking about things of this sort,
too.

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Leo L. Schwab -- The Guy in The Cape	ihnp4!ptsfa -\
 \_ -_		Recumbent Bikes:	      dual ---> !{well,unicom}!ewhac
O----^o	      The Only Way To Fly.	      hplabs / (pronounced "AE-wack")
"Work FOR?  I don't work FOR anybody!  I'm just having fun."  -- The Doctor