Assigns a texture to a stage for a device.
HRESULT SetTexture( DWORD Sampler, IDirect3DBaseTexture9 * pTexture );
Zero based sampler number. Textures are bound to samplers; samplers define sampling state such as the filtering mode and the address wrapping mode. Textures are referenced differently by the programmable and the fixed function pipeline:
If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be D3DERR_INVALIDCALL.
IDirect3DDevice9::SetTexture is not allowed if the texture is created with a pool type of D3DPOOL_SCRATCH. IDirect3DDevice9::SetTexture is not allowed with a pool type of D3DPOOL_SYSTEMMEM texture unless DevCaps is set with D3DDEVCAPS_TEXTURESYSTEMMEMORY.
Header: Declared in D3d9.h.
IDirect3DDevice9::GetTexture, IDirect3DDevice9::GetTextureStageState, IDirect3DDevice9::SetTextureStageState