PEXOCCSetTMResourceHints - Set Texture Mapping Resource Hints (5.2)


Synopsis

 
   void PEXOCCSetTMResourceHints(
        PEXOCC context,
        int optimization_hint,
        unsigned int count,
        PEXTableIndex *priorities
   )
 

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

optimization_hint
The resource optimization approach to consider for all subsequently activated textures (PEXTMResourceHintsNone, PEXTMResourceHintsSpeed, or PEXTMResourceHintsSpace).

count
The number of indices.

priorities
An array of texture binding table indices.

Returns

None.

Description

Invoke PEXOCCSetTMResourceHints to create an attribute output command which sets the optimization hint in the renderer's pipeline state according to the value specified by optimization_hint.

Use the texture mapping resource hint to specify how the implementation should consider optimizing its resources when subsequent entries of the texture mapping lookup table are activated.

PEXlib defines the following texture mapping resource hints (optimization_hint):

PEXTMResourceHintsNone -
specifies that no consideration should be made with respect to optimization. (5.2)

PEXTMResourceHintsSpeed -
specifies that speed should be considered first with respect to optimization. (5.2)

PEXTMResourceHintsSpace -
specifies that space should be considered first with respect to optimization. (5.2)

The pipeline state's texture mapping resource hints also includes a prioritized list of indices into the renderer's texture mapping lookup table. This list indicates the expected usage of the indicated textures. If the implementation uses the list, it only applies to subsequently activated textures, both when they are activated and when they are deactivated. Textures already activated and subsequently activated textures that are not in the list are assumed to be at some implementation-dependent priority lower than the textures in the list. The first texture in the list is expected to be activated most often, and the last texture the least, of the specified textures. If the same index appears multiple times in the list, then its highest priority is used. If an index is undefined, then it is ignored. The prioritized textures replace the list in the pipeline state's texture mapping resource hints.

If you specify an unsupported texture mapping resource optimization hint (priorities), then the optimization hint used is PEXTMResourceHintsNone. If priorities includes index zero, then the implementation issues a BadPEXOutputCommand error.

The texture mapping resource hints function is a member of the styled and shaded surface attribute set.

Errors

BadPEXOutputCommand
The output command contains an illegal 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.