zclear(3G)
zclear - initializes the z-buffer of the current framebuffer
As shipped in IRIX 6.5.30. Unchanged since IRIX 6.5.
NAME zclear - initializes the z-buffer of the current framebuffer FORTRAN 77 SPECIFICATION subroutine zclear PARAMETERS none DESCRIPTION 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 getgco(GCMZMA). Otherwise, it is equal to getgco(GCZMAX). 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 czclea instead of zclear. Because only the normal framebuffer includes a z buffer, zclear should be called only while draw mode is NORMDR. 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. SEE ALSO drawmo, getgco, scrmas, setpat, stenci, texbin, wmpack, writem, zbuffe, zwrite NOTE 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 z- buffer. In situations where this is necessary, czclea should be used instead of zclear. When using czclea, 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 zfunct(ZFALWA), 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.