PEXOCCSetSurfaceInterpMethod - Set Surface Interpolation Method (5.0)


Synopsis

 
   void PEXOCCSetSurfaceInterpMethod(
        PEXOCC context,
        int method
   )
 

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

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

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

Returns

None.

Description

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

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

If you do not set the facet distinguish flag to True (see PEXOCCSetFacetDistinguishFlag), then the implementation applies the surface interpolation method to back-facing as well as front-facing surface interiors. Otherwise the implementation uses the back-facing surface interpolation method (see PEXOCCSetBFSurfaceInterpMethod).

PEXlib defines the following surface interpolation methods (method):

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

PEXSurfaceInterpColor -
performs the reflection calculation at the vertices of the 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 surface or along a surface edge. (5.0)

PEXSurfaceInterpNormal -
interpolates vertex reflectance normals and performs reflectance calculations at each pixel in the interior of a surface or along a 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 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 all output attribute functions, see Output Attribute Functions.