Name
cgGetConnectedStateAssignmentParameter - get effect parameter which determines a state assignment's value
Synopsis
#include <Cg/cg.h>
CGparameter cgGetConnectedStateAssignmentParameter( CGstateassignment sa );
Parameters
- sa
-
A state assignment whose value is determined using an effect parameter.
Return Values
Returns the effect parameter used by sa.
Returns 0 if sa is not using a parameter for its value, if
the state assignment is set to an expression, or if an error occurs.
Description
cgGetConnectedStateAssignmentParameter returns the effect parameter
from which a given state assignment's value is determined.
Examples
/* in Effect.cgfx file */
int MyMinFilter;
sampler2D Samp = sampler_state {
MinFilter = MyMinFilter;
};
/* in .c/.cpp file */
CGparameter sampParam = cgGetNamedEffectParameter( myEffect, "Samp" );
CGstateassignment sa = cgGetNamedSamplerStateAssignment( sampParam,
"MinFilter" );
CGparameter connected = cgGetConnectedStateAssignmentParameter( sa );
Errors
CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR is generated if sa
is not a valid state assignment.
History
cgGetConnectedStateAssignmentParameter was introduced in Cg 2.0.
See Also
cgGetNamedEffectParameter,
cgGetNamedSamplerStateAssignment
|