czclea(3G)
czclea - clears the color bitplanes and the z-buffer simultaneously
As shipped in IRIX 6.5.30. Unchanged since IRIX 6.5.
NAME czclea - clears the color bitplanes and the z-buffer simultaneously FORTRAN 77 SPECIFICATION subroutine czclea(cval, zval) integer*4 cval, zval PARAMETERS cval expects the color to which you want to clear the color bitplanes. zval expects the depth value to which you want to clear the z-buffer. DESCRIPTION czclear sets the color bitplanes in the area of the viewport to cval, and the z buffer bitplanes in the area of the viewport to zval. Multiple color bitplane buffers can be cleared simultaneously using the backbu and frontb commands. The screen mask, when it is set to a subregion of the viewport, bounds the cleared region. Most other drawing modes, including alpha function, blend function, logical operation, polygon fill pattern, stenciling, texture mapping, writemask, zwritemask, and z buffering, have no effect on the operation of czclea. The current color does not change. Because only the normal framebuffer includes a z buffer, czclea should be called only while draw mode is NORMAL. In RGB mode, the cval parameter expects a packed integer of the same format used by cpack, namely $aabbggrr, where rr is the red value, bb the blue value, gg the green value, and aa is the alpha value. In color map mode this parameter expects an index into the current color map, so only up to 12 of the least-significant bits are significant. The valid range of the zval parameter depends on the graphics hardware. When multisample is enabled, and multisample buffers exist in the current framebuffer configuration in the current drawmode, the minimum is the value returned by getgco(GCMZMI) and the maximum is the value returned by getgco(GCMZMA). Otherwise, the minimum is the value returned by getgco(GCZMIN) and the maximum is the value returned by getgco(GCZMAX). It is unaffected by the state of the GLCZRA compatibility mode (see glcomp). After czclea executes, the graphics position is undefined. SEE ALSO afunct, blendf, clear, cpack, getgde, glcomp, logico, scrmas, setpat, stenci, texbin, wmpack, writem, zbuffe, zclear, zfunct NOTES Whenever you need to clear both the z-buffer and the color bitplanes to constant values at the same time, use czclea. A simultaneous clear will take place if circumstances allow it. There is never a penalty in calling czclea over calling clear and zclear sequentially. IRIS-4D GT and GTX models can do a simultaneous clear only under the following circumstances: o In RGB mode, the 24 least significant bits of cval (red, green, and blue) must be identical to the 24 least significant bits of zval. o In color map mode, the 12 least significant bits of cval must be identical to the 12 least significant bits of zval. IRIS-4D VGX models always clear color and z bitplanes banks sequentially, regardless of the values of cval and zval. On the Personal Iris, XS, XS24, XZ, Elan and Extreme, you can speed up czclea by as much as a factor of four for common values of zval if you call zfunct in conjunction with it such that one of the following conditions are met: __________________________________________ zval | zfunct __________________________________________ getgde(GDZMIN) ZF_GREATER or ZF_GEQUAL getgde(GDZMAX) ZF_LESS or ZF_LEQUAL __________________________________________ | | Iris Indigo, Indy, and XL systems have a 32-bit zbuffer so use getgde(GDZMAX) to get the maximum z value and getgde(GDZMIN) to get the minimum z value. For performance reasons, Elan, XS, and XS24 products do not physically clear the z-buffer when calling czclea. 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. BUGS IRIS-4D G models always clear their z-buffers to GDZMAX, regardless of the value passed to czclea.