NAME
cgD3D9SetSamplerState - set the state associated with a sampler parameter
SYNOPSIS
#include <Cg/cgD3D9.h> HRESULT cgD3D9SetSamplerState( CGparameter param, D3DSAMPLERSTATETYPE type, DWORD value );PARAMETERS
- param
The parameter whose state is to be set. It must be a sampler.
- type
The D3D sampler state to set.
- value
A value appropriate for the type. See the D3D documentation for appropriate values for each valid type.
RETURN VALUES
cgD3D9SetSamplerState returns D3D_OK if the it succeeds.
If the function fails due to a D3D call, that D3D failure code is returned.
DESCRIPTION
cgD3D9SetSamplerState sets the state associated with a particular sampler parameter.
EXAMPLES
The following example code illustrates the use of cgD3D9SetSamplerState:
// param is a CGparameter handle of type sampler ... // Set this sampler for tri-linear filtering cgD3D9SetSamplerState(param, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR); cgD3D9SetSamplerState(param, D3DSAMP_MINFILTER, D3DTEXF_LINEAR); cgD3D9SetSamplerState(param, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);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
cgD3D9SetSamplerState was introduced in Cg to-be-written.
SEE ALSO