NAME
cgGetNamedSamplerStateAssignment - get a sampler state assignment by name
SYNOPSIS
#include <Cg/cg.h> CGstateassignment cgGetNamedSamplerStateAssignment( CGparameter param, const char * name );PARAMETERS
- param
Specifies the sampler parameter to retrieve the sampler state assignment from.
- name
Specifies the name of the state assignment to retrieve.
DESCRIPTION
The sampler state assignments associated with a sampler parameter, as specified with a sampler_state block in an effect file, can be retrieved directly by name using the cgGetNamedSamplerStateAssignment function. The names of the sampler state assignments can be discovered by iterating through the sampler's state assignments (see the "cgGetFirstSamplerStateAssignment" document and the "cgGetNextSamplerStateAssignment" document), calling cgGetSamplerStateAssignmentName for each one in turn.
RETURN VALUES
Returns the named sampler state assignment. If the pass has no sampler state assignment corresponding to name, NULL is returned.
ERRORS
CG_INVALID_PARAMETER_HANDLE_ERROR is generated if param does not refer to a valid parameter.
SEE ALSO
the "cgIsSamplerStateAssignment" document, the "cgGetFirstSamplerStateAssignment" document, the "cgGetNextSamplerStateAssignment" document, the "cgGetSamplerStateAssignmentName" document