[comp.sys.sgi] Overlays, underlays

pff@beach.cis.ufl.edu (Pablo Fernicola) (08/28/89)

Are overlays and underlays available on the Personal Iris?  The info on
page 11-1 of the Graphics Library User's Guide is not clear about it.
If they are not available, can I achieve the same results using writemasks?

Thanks!
Pablo
pff@beach.cis.ufl.edu
--
pff@beach.cis.ufl.edu  Pablo Fernicola - Machine Intelligence Laboratory - UF
"That has nothing to do with computers; it is software."

woo@sharona.csd.sgi.com (Mason Woo) (08/29/89)

In article <20790@uflorida.cis.ufl.EDU>, pff@beach.cis.ufl.edu (Pablo Fernicola) writes:
> Are overlays and underlays available on the Personal Iris?  
> If they are not available, can I achieve the same results using writemasks?

If you have a 24 bitplane Personal IRIS, you also get 2 bitplanes of
overlay/underlay (as well as 2 bitplanes for the window manager overlays).
If you have the entry-level 8 bitplane machine, I believe (someone at SGI
correct me if I'm wrong!) you only get the 2 bitplanes for the window manager
overlays.  

You cannot achieve the same results with writemasks with an RGB application.
RGBwritemask would preserve bitplanes which would be directly used to 
display colors.  You couldn't draw into these bitplanes and then overlay
the other RGB bitplanes.

The writemask command can be used for overlays/underlays with a color map
application.  However, you will need to alter the loaded colors in your color
map to achieve the desired effect.  Each bitplane used doubles the number of
colors available for overlays/underlays (actually 2 to the N minus 1), but
also halves the number of colors available for the normal drawing.
For example, with an 8 bitplane system, if 3 are used for overlays, then
there are 7 overlay colors and 32 (2 to the 5th) standard image colors.

Double buffering makes a large difference when using writemasks.
If you use the 2 special bitplanes provided on the 24-bitplane Personal
IRIS, then the static overlay/underlay is only drawn once, and swapping
buffers will have no effect on the overlay/underlay.  If you use writemask,
then the bitplanes are reserved in both buffers.  

Commercial message:  Overlays and underlays are currently discussed in the
first IRIS 4D Graphics course.  Writemasks are not discussed in neither the
Graphics nor the Advanced Graphics courses, but we are thinking about 
including them when we revise the courses.

--
Mason ("sex, lies, and workstations") Woo	(415) 962-3314
Silicon Graphics Computer Systems
Internet: woo@SGI.COM              UUCP: {ames,ucbvax,decwrl,sun}!sgi!woo

tjh@bu-cs.BU.EDU (Timothy Hall) (08/29/89)

In article <41054@sgi.sgi.com> woo@sharona.csd.sgi.com (Mason Woo) writes:
>In article <20790@uflorida.cis.ufl.EDU>, pff@beach.cis.ufl.edu (Pablo Fernicola) writes:
>> Are overlays and underlays available on the Personal Iris?  
>> If they are not available, can I achieve the same results using writemasks?
>
>You cannot achieve the same results with writemasks with an RGB application.
>RGBwritemask would preserve bitplanes which would be directly used to 
>display colors.  You couldn't draw into these bitplanes and then overlay
>the other RGB bitplanes.
>
True, but if one is willing to give up the LSB of the RGB planes it is
possible to fake 3 more overlay planes.  So you could use 
RGBwritemask( 0xfe, 0xfe, 0xfe ) when writing to the RGB planes and
RGBwritemask( 1, 1, 1 ) when writing to the "overlays".  Use the gammaramp
function to set what your overlay colors will be.

-Tim
tjh@bu-pub.bu.edu

zombie@voodoo.UUCP (Mike York) (08/29/89)

In article <41054@sgi.sgi.com> woo@sharona.csd.sgi.com (Mason Woo) writes:
>Commercial message:  Overlays and underlays are currently discussed in the
>first IRIS 4D Graphics course.  Writemasks are not discussed in neither the
>Graphics nor the Advanced Graphics courses, but we are thinking about 
>including them when we revise the courses.

When I took the beginning gl class 4 years ago, writemasks were covered
thoroughly.  Now, when we we get a new person in our group and send them
to the basic gl class, no writemasks.  Writemasks are essential for our
application.  There are things you can do with writemasks in doublebuffer
mode that can't be done with underlays/overlays.  Writemasks should be 
covered in the basic gl class.

-- 
Mike York
Boeing Computer Services, Renton, Washington
(206) 234-7724
uw-beaver!ssc-vax!voodoo!zombie