zclear(3G) zclear(3G)
zclear - initializes the z-buffer of the current framebuffer
void zclear(void)
none
zclear sets the z-buffer in the area of the viewport to the largest
positive z value supported. When multisample is enabled, and multisample
buffers exist in the current framebuffer configuration in the current
drawmode, this value is equal to getgconfig(GC_MS_ZMAX). Otherwise, it is
equal to getgconfig(GC_ZMAX). Typically zclear is called prior to
rendering each frame. If you intend to clear the color bitplanes as well
as the z-buffer, or if you require control of the value written to the
z-buffer, call czclear instead of zclear.
Because only the normal framebuffer includes a z buffer, zclear should be
called only while draw mode is NORMALDRAW. Also, the current z writemask
controls which z-buffer bitplanes are modified during zclear execution,
and screenmask, when it is set to a subregion of the viewport, bounds the
cleared region. Other drawing modes, including polygon fill pattern,
stenciling, texture mapping, writemask, and z buffering, have no effect
on the operation of zclear.
After zclear executes, the graphics position is undefined.
drawmode, getgconfig, scrmask, setpattern, stencil, texbind, wmpack,
writemask, zbuffer, zwritemask
On the Personal Iris, for performance reasons, the z-buffer is not
physically cleared when zclear is called. Z-buffering works as it
normally would unless an attempt is made to read back data from the zbuffer.
In situations where this is necessary, czclear should be used
instead of zclear. When using czclear, the z-buffer will be physically
cleared to the specified value, if the specified value is in the range
-0x800001 to 0x7ffffe.
For performance reasons, XS, XS24, XZ, Elan and Extreme products do not
physically clear the z-buffer when calling zclear. On these systems, the
LSB of the z-buffer is used as a flag bit to signal that the z-buffer has
been cleared. The 23 remaining bits are used for the z comparison. In
order to physically clear the z-buffer, first call zfunction(ZF_ALWAYS),
then draw a polygon whose z coordinates map to the desired z value. To
avoid updating the framebuffer, call wmpack(0) before drawing. Restore
the writemask and z function afterwards.
PPPPaaaaggggeeee 1111 [ Back ]
|