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 parameter whose wrap mode is to be set. It must be a sampler.

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

cgD3D9SetTextureWrapMode returns D3D_OK if the function succeeds.

If the function fails due to a D3D call, that D3D failure code is returned.

DESCRIPTION

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

EXAMPLES

The following example code illustrates the use of cgD3D9SetTextureWrapMode:

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

ERRORS

CGD3D9ERR_INVALIDPARAM to-be-written

CGD3D9ERR_INVALIDPROFILE to-be-written

CGD3D9ERR_NODEVICE to-be-written

CGD3D9ERR_NOTLOADED to-be-written

CGD3D9ERR_NOTSAMPLER to-be-written

CGD3D9ERR_NOTUNIFORM to-be-written

CGD3D9ERR_NULLVALUE to-be-written

HISTORY

cgD3D9SetTextureWrapMode was introduced in Cg to-be-written.

SEE ALSO

cgD3D9SetTexture, cgD3D9SetSamplerState