Microsoft DirectX 8.1 (C++) |
Saves a texture to a file.
HRESULT D3DXSaveTextureToFile( LPCTSTR pDestFile, D3DXIMAGE_FILEFORMAT DestFormat, LPDIRECT3DBASETEXTURE8 pSrcTexture, CONST PALETTEENTRY* pSrcPalette );
If the function succeeds, the return value is D3D_OK.
If the function fails, the return value can be the following values.
D3DERR_INVALIDCALL |
This function supports the following file formats: .bmp and .dds.
This function handles conversion to and from compressed texture formats.
This function supports both Unicode and ANSI strings.
If the volume is nondynamic (because of a usage parameter set to 0 at the creation) and located in video memory (the memory pool set to D3DPOOL_DEFAULT), D3DXSaveTextureToFile will fail because Direct3DX cannot lock nondynamic volumes located in video memory.
Header: Declared in D3dx8tex.h.
Import Library: Use D3dx8.lib.