Platform SDK: DirectX |
The "border color" texture address mode, identified by the D3DTADDRESS_BORDER member of the D3DTEXTUREADDRESS enumerated type, causes Direct3D to use an arbitrary color, known as the border color, for any texture coordinates outside the range of 0.0 through 1.0, inclusive.
The "border color" texture address mode, identified by the D3DTADDRESS_BORDER member of the CONST_D3DTEXTUREADDRESS enumeration, causes Direct3D to use an arbitrary color, known as the border color, for any texture coordinates outside the range of 0.0 through 1.0, inclusive.
This is shown in the next illustration in which the application specified that the texture be applied to the primitive using a red border.
Applications set the border color by calling IDirect3DDevice7::SetTextureStageState. Set the first parameter for the call to the desired texture stage identifier, the second parameter to the D3DTSS_BORDERCOLOR stage state value, and the third parameter to the new RGBA border color.
If your application stills uses the legacy IDirect3DDevice2 interface, you can set the border color by calling IDirect3DDevice2::SetRenderState method, specifying the D3DRENDERSTATE_BORDERCOLOR render state value and the new RGBA border color as parameters. (The D3DRENDERSTATE_BORDERCOLOR render state is obsolete and is not recognized by the IDirect3DDevice7 interface.)
Visual Basic applications set the border color by calling Direct3DDevice7.SetTextureStageState. Set the first parameter for the call to the desired texture stage identifier, the second parameter to the D3DTSS_BORDERCOLOR stage state value, and the third parameter to the new RGBA border color.