> ## Name

> cgD3D11SetTextureSamplerStateParameter - Sets a texture resource and sampler state object to a Cg sampler parameter.

> ## Synopsis

>     #include <Cg/cgD3D11.h>

>     void cgD3D11SetTextureSamplerStateParameter( CGparameter param,
>                                                  ID3D11Resource * texture,
>                                                  ID3D11SamplerState * samplerState );

> ## Parameters

> param
>   The sampler parameter whose texture and state is to be set.
> texture
>   The texture resource object being set.
> samplerState
>   The sampler state object being set.

> ## Return Values

> None.

> ## Description

> cgD3D11SetTextureSamplerStateParameter accomplishes the same thing as calling both cgD3D11SetTextureParameter and cgD3D11SetSamplerStateParameter together.

> ## Examples

> ID3D11Resource * myTexture; ID3D11SamplerState * mySamplerState;

> Device->CreateTexture2D( &desc, &initalData, &myTexture ); Device->CreateSamplerState( &desc, &mySamplerState );

> cgD3D11SetTextureSamplerStateParameter( myCgSamplerParam, myTexture, mySamplerState );

> ## Errors

> CG_INVALID_PARAMETER_ERROR is generated if param is invalid.

> ## History

> cgD3D11SetTextureSamplerStateParameter was introduced in Cg 3.0.

> ## See Also

> cgD3D11SetTextureParameter, cgD3D11SetSamplerStateParameter