[comp.sys.sgi] reading overlay planes on non-PI machines

tjh@bucrf11.bu.edu (Tim Hall) (10/10/90)

Is it possible to read the overlay/underlay planes on non-PI machines?
I dug through the manuals (honest!) and I didn't come up with anything.
There is, of course, readsource( SRC_OVER ) and then doing a rectread
but the man page for readsource claims that the flag SRC_OVER only works
on PI's.  We'd like to do it on a 4D/2xx machines too.

If I recall correctly, gl_readscreen is able to read the overlay planes
on non-PI's but returns RGB values, not the color map values.

While I'm here, just a check.  The following would...
	overlay( 4 );
	readsource( SRC_OVER );
	rectread( blah, blah, woof, woof, buf );
...return 4 bits/pixel in the short array buf.

Many thanks for any help.

--
-Tim Hall
tjh@bu-pub.bu.edu

The night is filled with the cries of dispossessed children in search
of paradise.  -Dead Can Dance

kurt@cashew.asd.sgi.com (Kurt Akeley) (10/10/90)

readback of the overlay/underlay/popup bitplanes is supported for GT, GTX,
and VGX machines in the 3.3 release.  it is documented on the readsource
manpage, but it is complicated.  basically, you can ignore readsource,
as lrectread will return pixels from the currently active framebuffer,
as specified by the drawmode command.  therefore, to read or write pixels
in the overlay bitplanes, simply set drawmode to OVERDRAW and call the
appropriate read or write commands.  likewise for underlay and popup
bitplanes.  most pixel reading applications can now ignore readsource.

-- kurt

p.s. readback of overlay/underlay/popup bitplanes in this manner is also
     supported by the 3.3 personal iris release.  it also continues to
     support readsources SRC_OVER, SRC_UNDER, and SRC_PUP, which will not
     be implemented on any other machines.