![]() |
![]() |
![]() |
Saves a volume to a buffer. The method creates an ID3DXBuffer buffer to store the data, and returns that object.
Syntax
HRESULT WINAPI D3DXSaveVolumeToFileInMemory(
LPD3DXBUFFER *ppDestBuf, D3DXIMAGE_FILEFORMAT DestFormat, LPDIRECT3DVOLUME9 pSrcVolume, const PALETTEENTRY *pSrcPalette, const D3DBOX *pSrcBox );
Parameters
- ppDestBuf
- [out] Address of a pointer to an ID3DXBuffer buffer that will store the source image.
- DestFormat
- [in] D3DXIMAGE_FILEFORMAT specifying the file format to use when saving. This function supports saving to all D3DXIMAGE_FILEFORMAT formats except Portable Pixmap (.ppm) and Targa/Truevision Graphics Adapter (.tga).
- pSrcVolume
- [in] Pointer to IDirect3DVolume9 interface containing the image to be saved.
- pSrcPalette
- [in] Pointer to a PALETTEENTRY structure containing a palette of 256 colors. This parameter can be NULL.
- pSrcBox
- [in] Pointer to a D3DBOX structure. Specifies the source box. Set this parameter to NULL to specify the entire volume.
Return Value
If the function succeeds, the return value is D3D_OK.
If the function fails, the return value can be the following.
D3DERR_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value.
Function Information
Header d3dx9tex.h Import library d3dx9.lib Minimum operating systems Windows 98
See Also
D3DXSaveVolumeToFile