PEXOCCSetReflectanceBundleIndex - Set Reflectance Bundle Index (5.2)


Synopsis

 
   void PEXOCCSetReflectanceBundleIndex(
        PEXOCC context,
        unsigned int index
   )
 

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

index
The reflectance bundle table index.

Returns

None.

Description

Invoke PEXOCCSetReflectanceBundleIndex to create an attribute output command which sets an index to an interior bundle table in the renderer's pipeline state according to the value specified by index.

You use the reflection bundle index to select an entry of the renderer's interior bundle table whenever a bundlable reflection attribute's ASF is set to PEXBundled (see PEXOCCSetIndividualASF) and the renderer's PHIGS interior bundle mode is True. If you set the PHIGS interior bundle mode to False, then the implementation uses the interior bundle index to select the entry of the interior bundle from which the bundled reflectance attributes are taken. PEXlib supports the bundling of the following reflectance attributes: surface reflectance model and surface reflectance attributes.

If you specify an undefined index, then the index defaults to index one. If index one is not defined, then the implementation sets the bundled surface reflectance model to PEXReflectionNone; the ambient, diffuse, and specular coefficients to 1.0; the specular concentration to 0.0; the specular color to indexed color one, and the transmission coefficient to 0.0. If you specify a reflectance bundle index of zero, then the implementation issues a BadPEXOutputCommand error.

This function is a member of the basic surface attribute set.

Errors

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