PEXOCCSetTMPerspectiveCorrection - Set Texture Mapping Perspective Correction (5.2)


Synopsis

 
   void PEXOCCSetTMPerspectiveCorrection(
        PEXOCC context,
        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 type of texture mapping perspective correction to apply (PEXTMPerspectiveCorrectionNone, PEXTMPerspectiveCorrectionVertex, or PEXTMPerspectiveCorrectionPixel).

Returns

None.

Description

Invoke PEXOCCSetTMPerspectiveCorrection to create an attribute output command which sets the texture mapping perspective correction entry of the renderer's pipeline state according to the value specified by method.

The texture mapping perspective correction specifies if and how texture coordinates are adjusted for a perspective view mapping projection when rendering textured surface primitives.

PEXlib defines the following texture mapping perspective correction methods:

PEXTMPerspectiveCorrectionNone -
linearly interpolates texture coordinates without any effort to apply correction or perspective view mapping. (5.2)

PEXTMPerspectiveCorrectionVertex -
manipulates the texture coordinates associated with each vertex to account for perspective view mapping. Then, linearly interpolates the corrected values between vertices. (5.2)

PEXTMPerspectiveCorrectionPixel -
manipulates the texture coordinate values at each step as texture coordinates are interpolated to account for perspective view mapping. (5.2)

If you specify an unsupported texture mapping perspective correction method, then the method used is implementation-dependent.

The texture mapping perspective correction 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.