Name
cgGetDependentStateAssignmentParameter - get one of the parameters
that a state assignment's value depends on
Synopsis
#include <Cg/cg.h>
CGparameter cgGetDependentStateAssignmentParameter( CGstateassignment sa,
int index );
Parameters
- sa
-
The state assignment handle.
- index
-
The index of the parameter to return.
Return Values
Returns a handle to the selected dependent parameter on success.
Returns NULL if an error occurs.
Description
State assignments in CgFX files may include references to one or more
effect parameters on the right hand side of the state assignment that are
used for computing the state assignment's value.
cgGetDependentStateAssignmentParameter returns one of these parameters,
as indicated by the given index.
cgGetNumDependentStateAssignmentParameters can be used to determine the
total number of such parameters.
This information can be useful for applications that wish to cache the
values of annotations so that they can determine which annotations may
change as the result of changing a particular parameter's value.
Examples
to-be-written
Errors
CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR is generated if sa is not a valid state assignment.
CG_OUT_OF_ARRAY_BOUNDS_ERROR is generated if index is less than zero
or greater than or equal to the number of dependent parameters, as returned by
cgGetNumDependentStateAssignmentParameters.
History
cgGetDependentStateAssignmentParameter was introduced in Cg 1.4.
See Also
cgGetDependentAnnotationParameter,
cgGetNumDependentStateAssignmentParameters
|