cgGetConnectedStateAssignmentParameter(3)

NAME
cgGetConnectedStateAssignmentParameter - get effect parameter which determines a state assignment's value

SYNOPSIS
  #include <Cg/cg.h>
  CGparameter cgGetConnectedStateAssignmentParameter( CGstateassignment sa );

PARAMETERS
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