PEXOCCSetBFSurfaceInterpMethod - Set Back-Facing Surface Interpolation Method (5.0)


Synopsis

 
     void PEXOCCSetBFSurfaceInterpMethod(
          PEXOCC context,
          int method
     )

 
     void PEXSetBFSurfaceInterpMethod(
          Display *display,
          XID resource_id,
          PEXOCRequestType req_type,
          int method
     )

Arguments

context
An OC context returned by a successful PEXCreateOCCcall.

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

method
The back-facing surface interpolation method (PEXSurfaceInterpNone, PEXSurfaceInterpColor, PEXSurfaceInterpDotProduct or PEXSurfaceInterpNormal).

Returns

None.

Description

Invoke PEXOCCSetBFSurfaceInterpMethod to create an attribute output command which sets the back-facing surface interpolation method attribute in the renderer's pipeline state according to the value specified by method.

By setting the back-facing surface interpolation method attribute's ASF to PEXIndividual (see PEXOCCSetIndividualASF), you use the back-facing surface interpolation method entry to specify how color values, including any alpha component, are computed in the interior of back-facing surface primitives. When you set the back-facing surface interpolation method attribute's ASF to PEXBundled, the implementation uses the back-facing surface interpolation method from the interior bundle table.

To apply the back-facing interpolation method to the back-facing surfaces of output primitives, you must set the facet distinguish flag to True (see PEXOCCSetFacetDistinguishFlag). If you set the flag to False, then the implementation uses the surface interpolation method when applying the interpolation method to back-facing surfaces (see PEXOCCSetSurfaceInterpMethod).

PEXlib defines the following interpolation methods (method):

PEXSurfaceInterpNone -
uses the color resulting from a single evaluation of the reflectance calculation to render the entire back-facing surface. Interpolation is not performed across surface interiors or edges. (5.0)

PEXSurfaceInterpColor -
performs the reflection calculation at the vertices of the back-facing surface. Then linearly interpolates the resulting color values across the interior of the surface and the edges. (5.0)

PEXSurfaceInterpDotProduct -
computes at each vertex any dot products needed by the reflectance calculation. Then linearly interpolates these dot products and performs the reflectance calculation using these values to compute the color value at each pixel in the interior of a back-facing surface or along a back-facing surface edge. (5.0)

PEXSurfaceInterpNormal -
interpolates vertex reflectance normals and performs the reflectance calculation at each pixel in the interior of a back-facing surface or along a back-facing surface edge. (5.0)

If the implementation does not support the specified interpolation method, then the method defaults to PEXSurfaceInterpNone. Inquire the supported values for the back-facing surface interpolation method by invoking the PEXGetEnumTypeInfo function.

This function is a member of the styled and shaded surface 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.