zsource(3G) zsource(3G)
NAME
zsource - selects the source for z-buffering comparisons
C SPECIFICATION
void zsource(src)
long src;
PARAMETERS
src expects one of two possible values:
ZSRCDEPTH, z-buffering is done by depth comparison (default).
ZSRCCOLOR, z-buffering is done by color comparison.
DESCRIPTION
By default z-buffer comparisons are done on depth data. However, in
certain cases, it can be useful to z-buffer by comparing color values,
especially the color index values generated by the linesmooth and
pntsmooth hardware. When the src parameter is ZSRC_DEPTH, the z-buffer
operation is normal. When the src parameter is ZSRC_COLOR, however,
source and destination color values are compared to determine which
pixels the system draws. In this mode, the zbuffer is not updated when a
pixel is written.
A separate zsource mode is retained by each of the framebuffers: normal,
popup, overlay, and underlay. The current draw mode determines which z
source mode is used, and which is modified by zsource.
SEE ALSO
drawmode, gversion, linesmooth, pntsmooth, zbuffer, zfunction
NOTES
This subroutine does not function on IRIS-4D B or G models.
Currently z-buffer operation is supported only in the normal framebuffer.
To insure compatibility with future releases of the GL, make calls to
zsource only while draw mode is NORMALDRAW.
Use zsource(ZSRCCOLOR) for correct anti-aliasing support in color index
mode on Iris Indy and Iris Indigo.
BUGS
IRIS-4D GT and GTX models support zsource(ZSRCCOLOR) only for non-
subpixel positioned lines drawn after a linesmooth(SMLON) call.
On early serial numbers of the Personal Iris, ZSRC_DEPTH is the only
supported setting for this routine. For compatibility, they accept the
call zsource(ZSRCCOLOR), but it has the same effect as calling
zfunction(ZFALWAYS), which turns off z value comparison. This allows the
unrestricted drawing of color values into the front and back buffers and
depth values into the z-buffer. Use gversion to determine which type of
Personal Iris you have.
Page 1
zsource(3G) zsource(3G)
IRIS-4D VGX models support zsource(ZSRCCOLOR) only in color map mode.
Stencil operation is undefined in this case.
Page 2