Direct3D maintains a list of up to eight current textures. It blends these textures onto all of the primitive it renders. Only textures created as texture interface pointers can be used in the set of current textures.
Applications call the IDirect3DDevice3::SetTexture method to assign textures into 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 code fragment demonstrates how a texture can be assigned into the set of current textures:
// This code fragment assumes that the variable lpd3dDev is a valid
// pointer to an IDirect3D3 interface and lpd3dTexture is a valid
// pointer to an IDirect3DTexture2 interface.
// Set the third texture.
lpd3dDev->SetTexture(2, lpd3dTexture);
Note Software devices do not support assigning a texture to more than one texture stage at a time.