Microsoft DirectX 8.1 (C++) |
Assigns a texture to a stage for a device.
HRESULT SetTexture( DWORD Stage, IDirect3DBaseTexture8* pTexture );
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value can be D3DERR_INVALIDCALL.
This method increments the reference count of the texture surface being assigned and decrements the reference count of the previously selected texture if there is one. When the texture is no longer needed, set the texture at the appropriate stage to NULL. Failure to do this results in a memory leak.
Header: Declared in D3d8.h.
Import Library: Use D3d8.lib.
IDirect3DDevice8::GetTexture, IDirect3DDevice8::GetTextureStageState, IDirect3DDevice8::SetTextureStageState