PEXOCCSetTMSampleFrequency - Set Texture Mapping Sample Frequency (5.2)


Synopsis

 
   void PEXOCCSetTMSampleFrequency(
        PEXOCC context,
        int frequency
   )
 

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

frequency
The texture mapping sample frequency (PEXTMSampleFrequencyPixel or PEXTMSampleFrequencyInterpDep).

Returns

None.

Description

Invoke PEXOCCSetTMSampleFrequency to create an attribute output command which sets the texture mapping sample frequency entry of the renderer's pipeline state according to the value specified by frequency.

Use the texture mapping sample frequency to specify the frequency to sample texels in a texture map when rendering textured surface primitives.

PEXlib defines the following texture mapping sample frequencies (frequency):

PEXTMSampleFrequencyPixel -
samples texture map texels once for each pixel. (5.2)

PEXTMSampleFrequencyInterpDep -
the texture map sample frequency is dependent on the pipeline state's surface interpolation method (see PEXOCCSetSurfaceInterpMethod) as follows: (5.2)

If the interpolation method is PEXSurfaceInterpNone, then the implementation samples texture map texels once per facet.

If the interpolation method is PEXSurfaceInterpColor, then the implementation samples texture map texels once per vertex.

If the interpolation method is PEXSurfaceInterpDot or PEXSurfaceInterpNormal, then the implementation samples texture map texels once per pixel.

If you specify an unsupported texture mapping sample frequency, then the frequency defaults to PEXSampleFrequencyPixel.

The texture mapping sample frequency 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.