PEXOCCSetZBufferTest - Set Z Buffer Test Criteria (5.2)


Synopsis

 
   void PEXOCCSetZBufferTest(
        PEXOCC context,
        int z_test
   )
 

Arguments

context
An OC context returned by a successful PEXCreateOCC call.

display (OCC)
A pointer to a display structure returned by a successful XOpenDisplay call.

resource_id (OCC)
The resource identifier of the renderer or structure.

req_type (OCC)
The request type for the output command (PEXOCRender, PEXOCStore, PEXOCRenderSingle or PEXOCStoreSingle).

z_test
The Z buffer test criteria (PEXZBufferTestLessThan, PEXZBufferTestLessThanOrEqual, PEXZBufferTestGreaterThan, PEXZBufferTestGreaterThanOrEqual, PEXZBufferTestEqual, PEXZBufferTestNotEqual, or PEXZBufferTestPass).

Returns

None.

Description

Invoke PEXOCCSetZBufferTest to set the Zbuffer test entry of the renderer's pipeline state according to the value specified by z_test.

The z-buffer test specifies the criterion used to determine whether a pixel is visible or hidden when you enable HLHSR and accomplish it via z-buffering. z_test defines how the pixel's z-component is compared against the corresponding z-buffer value. If the comparison is True, then the pixel is visible. The z-buffer test is applied in a right-handed coordinate system where a larger z-value is closer to the eyepoint.

PEXlib defines the following z-buffer tests (z-test):

PEXZBufferTestLessThan -
if pixel z value < z-buffer value, then the pixel is visible. (5.2)

PEXZBufferTestLessThanOrEqual -
if pixel z value <= z-buffer value, then the pixel is visible. (5.2)

PEXZBufferTestGreaterThan -
if pixel z value > z-buffer value, then the pixel is visible. (5.2)

PEXZBufferTestGreaterThanOrEqual -
if pixel z value >= z-buffer value, then the pixel is visible. (5.2)

PEXZBufferTestEqual -
if pixel z value == z-buffer value, then the pixel is visible. (5.2)

PEXZBufferTestNotEqual -
if pixel z value != z-buffer value, then the pixel is visible. (5.2)

PEXZBufferTestPass -
the pixel is always visible. (5.2)

If you specify an unsupported z-buffer test criteria value (z_test), then the z-buffer test used is implementation-dependent.

This function is a member of the global attribute set.

Errors

BadPEXRenderer
The specified renderer resource identifier is invalid.

BadPEXStructure
The specified structure resource identifier is invalid.

See Also

For an overview and for a list of output attribute functions, see Output Attribute Functions.