Microsoft DirectX 8.0 (Visual Basic)

Assigning the Current Textures

Microsoft® Direct3D® maintains a list of up to eight current textures. It blends these textures onto all the primitive it renders. Only textures created as texture interface pointers can be used in the set of current textures.

Applications written in Microsoft® Visual Basic® call Direct3DDevice8.SetTexture to assign textures to the set of current textures. The first parameter must be from the a number in the range of 0-7, inclusive. Pass the texture interface pointer as the second parameter.

The following Visual Basic code example demonstrates how a texture can be assigned into the set of current textures.

' This code example assumes that the variable d3dDevice is a
' valid reference to a Direct3DDevice8 object and d3dTexture 
' is a valid reference to a Direct3DBaseTexture8 object.
 
' Set the third texture.
Call d3dDevice.SetTexture(2, d3dTexture)

Note  Software devices do not support assigning a texture to more than one texture stage at a time.