Microsoft DirectX 8.1 (C++) |
Saves a surface to a file.
HRESULT D3DXSaveSurfaceToFile( LPCTSTR pDestFile, D3DXIMAGE_FILEFORMAT DestFormat, LPDIRECT3DSURFACE8 pSrcSurface, CONST PALETTEENTRY* pSrcPalette, CONST RECT* pSrcRect );
If the function succeeds, the return value is D3D_OK.
If the function fails, the return value can be the following.
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.
Header: Declared in D3dx8tex.h.
Import Library: Use D3dx8.lib.