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

> ## Name

> cgGetFirstSamplerStateAssignment - get the first state assignment in a sampler_state block

> ## Synopsis

>     #include <Cg/cg.h>

>     CGstateassignment cgGetFirstSamplerStateAssignment( CGparameter param );

> ## Parameters

> param
>   The sampler parameter from which to retrieve the first state assignment.

> ## Return Values

> Returns the first CGstateassignment object assigned to param.

> Returns NULL if param has no sampler_state block or an error occurs.

> ## Description

> cgGetFirstSamplerStateAssignment is used to begin iteration over all of the state assignments contained within a sampler_state block assigned to a parameter in an effect file. See cgGetNextStateAssignment for more information.

> ## Examples

> to-be-written

> ## Errors

> CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.

> ## History

> cgGetFirstSamplerStateAssignment was introduced in Cg 1.4.

> ## See Also

> cgGetNextStateAssignment, cgIsStateAssignment