?/TD>
Microsoft DirectX 9.0

D3DXLoadVolumeFromVolume Function


Loads a volume from another volume.

Syntax

HRESULT D3DXLoadVolumeFromVolume(      

    LPDIRECT3DVOLUME9 pDestVolume,     CONST PALETTEENTRY *pDestPalette,     CONST D3DBOX *pDestBox,     LPDIRECT3DVOLUME9 pSrcVolume,     CONST PALETTEENTRY *pSrcPalette,     CONST D3DBOX *pSrcBox,     DWORD Filter,     D3DCOLOR ColorKey );

Parameters

pDestVolume
[in] Pointer to an IDirect3DVolume9 interface. Specifies the destination volume, which receives the image.
pDestPalette
[in] Pointer to a PALETTEENTRY structure, the destination palette of 256 colors or NULL.
pDestBox
[in] Pointer to a D3DBOX structure. Specifies the destination box. Set this parameter to NULL to specify the entire volume.
pSrcVolume
[in] A Pointer to an IDirect3DVolume9 interface. Specifies the source volume.
pSrcPalette
[in] Pointer to a PALETTEENTRY structure, the source palette of 256 colors or NULL.
pSrcBox
[in] Pointer to a D3DBOX structure. Specifies the source box. Set this parameter to NULL to specify the entire volume.
Filter
[in] A combination of one or more D3DX_FILTER, controlling how the image is filtered. Specifying D3DX_DEFAULT for this parameter is the equivalent of specifying D3DX_FILTER_TRIANGLE | D3DX_FILTER_DITHER.
ColorKey
[in] D3DCOLOR value to replace with transparent black, or 0 to disable the colorkey. This is always a 32-bit ARGB color, independent of the source image format. Alpha is significant and should usually be set to FF for opaque color keys. Thus, for opaque black, the value would be equal to 0xFF000000.

Return Value

If the function succeeds, the return value is D3D_OK.

If the function fails, the return value can be one of the following values.

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
D3DXERR_INVALIDDATAThe data is invalid.


Remarks

Writing to a non-level-zero surface of the volume texture will not cause the dirty rectangle to be updated. If D3DXLoadVolumeFromVolume is called and the surface was not already dirty (this is unlikely under normal usage scenarios), the application needs to explicitly call IDirect3DVolumeTexture9::AddDirtyBox on the surface.

Function Information

Headerd3dx9tex.h
Import libraryd3dx9.lib
Minimum operating systems Windows 98

See Also

D3DXLoadVolumeFromFile, D3DXLoadVolumeFromFileInMemory, D3DXLoadVolumeFromMemory, D3DXLoadVolumeFromResource, Texture Color Conversions


© 2002 Microsoft Corporation. All rights reserved.