> # NAME

> cgD3D9SetTextureWrapMode - set the texture wrap mode for a sampler parameter

> # SYNOPSIS

>       #include <Cg/cgD3D9.h>

>       HRESULT cgD3D9SetTextureWrapMode( CGparameter param,
>                                         DWORD value );

> # PARAMETERS

> param

>   The sampler parameter whose wrap mode is to be set.

> value

>   The texture wrap mode. value can be zero (0) or a combination of D3DWRAP_U, D3DWRAP_V, and D3DWRAP_W. See the D3D documentation for an explanation of texture wrap modes (D3DRS_WRAP0-7).

> # RETURN VALUES

> Returns D3D_OK if the function succeeds.

> Returns the D3D failure code if the function fails due to a D3D call.

> # DESCRIPTION

> cgD3D9SetTextureWrapMode sets the texture wrap mode associated with a sampler parameter.

> # EXAMPLES

>       // param is a CGparameter handle of type sampler
>       ...
>       // Set this sampler for wrapping in 2D
>       cgD3D9SetTextureWrapMode(param, D3DWRAP_U | D3DWRAP_V);

> # ERRORS

> cgD3D9Failed is generated if a D3D function returns an error.

> CGD3D9ERR_INVALIDPROFILE is returned if params's profile is not a supported D3D profile.

> CGD3D9ERR_NODEVICE is returned if a required D3D device is NULL. This usually occurs when an expanded interface routine is called but a D3D device has not been set with cgD3D9SetDevice.

> CGD3D9ERR_NOTLOADED is returned if program was not loaded with the cgD3D9LoadProgram.

> CGD3D9ERR_NOTSAMPLER is returned if param is not a sampler.

> CGD3D9ERR_NOTUNIFORM is returned if param is not a uniform parameter.

> CGD3D9ERR_INVALIDPARAM is returned if the parameter fails to set for any other reason.

> # HISTORY

> cgD3D9SetTextureWrapMode was introduced in Cg 1.1.

> # SEE ALSO

> cgD3D9SetTexture, cgD3D9SetSamplerState