|Microsoft DirectX 9.0|
Assigns a texture to a stage for a device.
DWORD Stage, IDirect3DBaseTexture9 *pTexture );
- [in] Stage identifier to which the texture is set. Stage identifiers are zero-based. The maximum number of stages supported is determined from two caps: D3DCAPS.MaxSimultaneousTextureStages and D3DCAPS9.MaxTextureBlendingStages.
Displacement Mapping uses a special stage index, called D3DDDMAPSAMPLER.
Vertex Textures use a special stage index called D3DVERTEXTEXTURESAMPLER.
- [in] Pointer to an IDirect3DBaseTexture9 interface, representing the texture being set.
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.