cgGetSamplerStateAssignmentParameter
Keywords: cgGetSamplerStateAssignmentParameter, NVIDIA, NVIDIA Cg Toolkit, Cg Toolkit, Shader, Shader Programming, GPU Shader Programming, GPU Program

> ## 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

> Returns a handle to a parameter.

> Returns NULL if sa is not a state assignment in a sampler_state block.

> ## 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

> Given an effect file with:

>       sampler2D foo = sampler_state { GenerateMipmap = true; }

> cgGetSamplerStateAssignmentParameter returns a handle to foo if passed a handle to the GenerateMipmap state assignment.

> ## Errors

> CG_INVALID_STATE_ASSIGNMENT_HANDLE_ERROR is generated if sa is not a valid state assignment.

> ## History

> cgGetSamplerStateAssignmentParameter was introduced in Cg 1.4.

> ## See Also

> cgIsStateAssignment, cgIsParameter