![]() |
![]() |
Saves a volume to a file on disk.
HRESULT D3DXSaveVolumeToFile( LPCTSTR pDestFile, D3DXIMAGE_FILEFORMAT DestFormat, LPDIRECT3DVOLUME9 pSrcVolume, CONST PALETTEENTRY * pSrcPalette, CONST D3DBOX * pSrcBox );
If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be the following: D3DERR_INVALIDCALL
The compiler setting also determines the function version. If Unicode is defined, the function call resolves to D3DXSaveVolumeToFileW. Otherwise, the function call resolves to >D3DXSaveVolumeToFileA because ANSI strings are being used.
This function handles conversion to and from compressed texture formats.
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 D3DX cannot lock nondynamic volumes located in video memory.
Header: Declared in D3dx9tex.h.
D3DXSaveSurfaceToFile, D3DXSaveTextureToFile, D3DXSaveVolumeToFileInMemory