PEXOCCSetFacetCullingMode - Set Facet Culling Mode (5.0)


Synopsis

 
   void PEXOCCSetFacetCullingMode(
        PEXOCC context,
        int mode
    )
 

 
   void PEXSetFacetCullingMode(
        Display *display,
        XID resource_id,
        PEXOCRequestType req_type,
        int mode
   )
 

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).

mode
The facet culling mode (PEXNone, PEXBackFaces or PEXFrontFaces).

Returns

None.

Description

Invoke PEXOCCSetFacetCullingMode to create an attribute output command which sets the facet culling mode attribute in the renderer's pipeline state.

PEXlib defines the following facet culling modes (mode):

PEXNone -
does not render any facets. (5.0)

PEXBackFaces -
renders front-facing facets and does not render back-facing facets. (5.0)

PEXFrontFaces -
renders back-facing facets and does not render front-facing facets. (5.0)

A front-facing facet is defined if the geometric normal of a primitive facet has a non-negative z-component in normalized projection coordinates (NPCs).

If you specify an undefined facet culling mode, then the implementation issues a BadPEXOutputCommand error.

This function is a member of the general surface attribute set.

Errors

BadPEXOutputCommand
The output command contains an invalid value.

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.