PEXOCCSetSurfaceActiveTextures - Set Surface Active Textures (5.2)


Synopsis

 
   void PEXOCCSetSurfaceActiveTextures(
        PEXOCC context,
        unsigned int count,
        PEXTableIndex *indices
   )
 

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

count
The number of indices in the list.

indices
A list of table indices into the texture mapping lookup table.

Returns

None.

Description

Invoke PEXOCCSetSurfaceActiveTextures to create an attribute output command which sets the surface active textures attribute in the renderer's pipeline state according to the values specified by indices.

You use the pipeline state's active texture indices as an entry into the renderer's texture mapping lookup table. The indices are an ordered list that you use to select the textures that are sequentially applied to textured surfaces. The active texture specifies the texture map and an associated set of values. It applies only to surface primitives when the primitive's interior style is PEXInteriorStyleTexture and the active textures field is non-empty.

If you do not set the facet distinguish flag to True (see PEXOCCSetFacetDistinguishFlag), then the implementation applies active textures to the facets of back-facing as well as front-facing surface interiors when the interior style is PEXInteriorStyleTexture and the active textures field is non-empty. Otherwise the implementation uses the back-facing surface active textures when the interior style is PEXInteriorStyleTexture and the active textures field is non-empty (see PEXOCCSetBFSurfaceActiveTextures).

If the number of indices you specify exceeds the maximum number of texture maps that your implementation can apply to a single surface, then the implementation ignores textures defined beyond the limit. Inquire the maximum number of texture maps, which you can apply to a single surface, by invoking the PEXGetImpDepConstants function.

If you specify a texture mapping lookup table index of zero, then the implementation issues a BadPEXOutputCommand error.

This function is a member of the syled and shaded surface attribute set.

Errors

BadPEXOutputCommand
An index is zero.

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.