readsource(3G) readsource(3G)
NAME
readsource - sets the source for pixels that various routines read
C SPECIFICATION
void readsource(src)
long src;
PARAMETERS
src expects a symbolic constant that identifies the pixel source that
is to be used:
SRCAUTO selects the front color buffer when the current
framebuffer, as specified by drawmode, is in single buffer mode. It
selects the back color buffer when the current framebuffer is in
double buffer mode. This is the default.
SRCFRONT selects the front color buffer of the current
framebuffer, as specified by drawmode. This source is valid for
both single buffer and double buffer operation.
SRCBACK selects the back color buffer of the current framebuffer,
as specified by drawmode. This source is valid only while the
current framebuffer is in double buffer mode.
SRCZBUFFER selects the z-buffer of the current framebuffer.
Because only the normal framebuffer has a z-buffer, this source is
currently valid only while draw mode is NORMALDRAW.
SRCFRAMEGRABBER selects the Live Video Digitizer as the pixel
source, regardless of the current draw mode. This source is valid
only on IRIS-4D GTX and VGX models with the Live Video Digitizer
option board. IRIS-4D GTX models support this source only during
rectcopy, not rectread or lrectread.
SRCOVER selects the overlay planes, and is valid only while draw
mode is NORMALDRAW. This source is valid only on the Personal
Iris.
SRCUNDER selects the underlay planes, and is valid only while draw
mode is NORMALDRAW. This source is valid only on the Personal
Iris.
SRCPUP selects the pop-up planes, and is valid only while draw
mode is NORMALDRAW. This source is valid only on the Personal
Iris.
SRCILBUFFER1 SRCILBUFFER2 SRCILBUFFER3 SRCILBUFFER4
SRCILBUFFER5 SRCILBUFFER6 SRCILBUFFER7 SRCILBUFFER8
SRCILBUFFER9 SRCILBUFFER10 SRCILBUFFER11 SRCILBUFFER12
SRCILBUFFER13 SRCILBUFFER14 SRCILBUFFER15 SRCILBUFFER16
selects the ilbuffers previously allocated with ilbuffer. This
source is valid only on the RealityEngine systems running 5.0.1 or
Page 1
readsource(3G) readsource(3G)
later.
DESCRIPTION
readsource specifies the pixel source buffer that rectcopy, readpixels,
readRGB, rectread, and lrectread use. A separate read source is
maintained for each of the GL framebuffers: normal, pop-up, overlay, and
underlay. Calls to readsource change the read source of the currently
active framebuffer, as specified by drawmode. By default the read source
for each framebuffer is SRCAUTO.
Because read sources, with the exception of some implemented only on the
Personal Iris, always specify a source within the current framebuffer, it
is not possible to copy pixels from one framebuffer to another. Such a
copy must be implemented by first reading pixels out of the source
framebuffer, then changing the draw mode to the destination framebuffer,
and writing the pixels.
SEE ALSO
lrectread, readpixels, readRGB, rectcopy
NOTES
This subroutine is available only in immediate mode.
On the IRIS-4D B or G models, SRCZBUFFER is not available.
Read sources SRCOVER, SRCUNDER, and SRCPUP operate only on the
Personal Iris.
BUGS
On the IRIS-4D GT and GTX models, and on all Personal IRIS, XS, XS24, XZ,
Elan and Extreme systems, a single readsource variable is shared between
the four framebuffers.
On the Personal Iris, the source for pixel reads does not change when
changing framebuffers (via drawmode) unless the current selected read
source is SRCAUTO (the default).
On some IRIS-4D GT and GTX models, while copying rectangles with blending
active, readsource also specifies the bank from which destination color
and alpha are read (overriding the blendfunction setting).
Page 2