Microsoft DirectX 8.1 (Visual Basic) |
Assigns a texture to a stage for a device.
object.SetTexture( _ Stage As Long, _ Texture As Direct3DBaseTexture8)
If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
This method increments the reference count of the texture surface being assigned, and it 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 Nothing. Failure to do this results in a memory leak.
Direct3DDevice8.GetTexture, Direct3DDevice8.GetTextureStageState, Direct3DDevice8.SetTextureStageState