Platform SDK: DirectX |
The Direct3DDevice7.SetTexture method assigns a texture to a given stage for a device.
object.SetTexture( _ stage As Long, _ texture As DirectDrawSurface7)
If the method fails, an error is raised and Err.Number may be set to one of the following values:
DDERR_INVALIDOBJECT |
DDERR_INVALIDPARAMS |
For information on trapping errors, see the Visual Basic Error Trapping topic.
When the texture is no longer needed, you should set the texture at the appropriate stage to Nothing. If you fail to do this, the memory for the surface may be lost when your application closes.
Software devices do not support assigning a texture to more than one texture stage at a time.
Direct3DDevice7.GetTexture, Direct3DDevice7.GetTextureStageState, Direct3DDevice7.SetTextureStageState, Textures