Platform SDK: DirectX |
The Direct3DX utility library supports loading textures from the following file formats: BMP, DIB, TGA, and DDS. The texture is loaded and then converted into a size and format commensurate with the current rasterizer restrictions. In this way, the Direct3DX utility library provides a simple way to create and manipulate textures.
The pointer to the IDirectDrawSurface7 interface that is returned by the texture creation functions can be used directly with the IDirect3DDevice7::SetTexture method.
In the case that the image needs to be resized, the image is stretched using a bilinear filter to fill the entire surface.
It is recommended that you use 256×256 (or smaller) square power-of two textures to avoid possible resizing errors. You can use the D3DXCheckTextureRequirements function to determine if Direct3DX will need to resize a particular texture to make it work with the current hardware.
There may be a performance degradation if a resizing or format change is necessary. For maximum image quality on a wide range of hardware platforms, use a 24-bit RGB or 32-bit ARGB format.