NAME

cgGetNamedStateAssignment - get a pass state assignment by name

SYNOPSIS

  #include <Cg/cg.h>

  CGstateassignment cgGetNamedStateAssignment( CGpass pass, const char * name );

STATE ASSIGNMENTS

pass

Specifies the pass to retrieve the state assignment from.

name

Specifies the name of the state assignment to retrieve.

DESCRIPTION

The state assignments of a pass can be retrieved directly by name using the cgGetNamedStateAssignment function. The names of the state assignments in a pass can be discovered by iterating through the pass's state assignments (see the "cgGetFirstStateAssignment" document and the "cgGetNextStateAssignment" document), calling cgGetStateAssignmentName for each one in turn.

RETURN VALUES

Returns the named state assignment from the pass. If the pass has no state assignment corresponding to name, NULL is returned.

ERRORS

CG_INVALID_PASS_HANDLE_ERROR is generated if pass does not refer to a valid pass.

SEE ALSO

the "cgIsStateAssignment" document, the "cgGetFirstStateAssignment" document, the "cgGetNextStateAssignment" document, the "cgGetStateAssignmentName" document