NAME

cgGetSamplerStateAssignmentParameter - get the sampler parameter being set up given a state assignment in its sampler_state block

SYNOPSIS

  #include <Cg/cg.h>

  CGparameter cgGetSamplerStateAssignmentParameter( CGstateassignment sa );

PARAMETERS

sa

The state assignment in a sampler_state block

RETURN VALUES

cgGetSamplerStateAssignmentParameter returns a handle to a parameter. If sa is not a state assignment in a sampler_state block, NULL is returned.

DESCRIPTION

Given the handle to a state assignment in a sampler_state block in an effect file, cgGetSamplerStateAssignmentParameter returns a handle to the sampler parameter being initialized.

EXAMPLES

For example, given an effect file with:

  sampler2D foo = sampler_state { GenerateMipmap = true; }

If sa is a handle to the GenerateMipmap state assignment, then cgGetSamplerStateAssignmentParameter returns a handle to foo.

ERRORS

CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR is generated if sa does not refer to a valid state assignment.

HISTORY

cgGetSamplerStateAssignmentParameter was introduced in Cg 1.4.

SEE ALSO

function1text, function2text