D3DXCreatePRTCompBuffer function
Creates a compressed precomputed radiance transfer (PRT) buffer from an uncompressed ID3DXPRTBuffer object. This function should be used with per-vertex or volume buffers.
Syntax
HRESULT D3DXCreatePRTCompBuffer(
_In_ D3DXSHCOMPRESSQUALITYTYPE Quality,
_In_ UINT NumClusters,
_In_ UINT NumPCA,
_In_ LPD3DXSHPRTSIMCB pCB,
_In_ LPVOID lpUserContext,
_In_ LPD3DXPRTBUFFER pBuffer,
_Inout_ LPD3DXPRTCOMPBUFFER *ppBuffer
);
Parameters
-
Quality [in]
-
Type: D3DXSHCOMPRESSQUALITYTYPE
Quality of spherical harmonic (SH) compression. See D3DXSHCOMPRESSQUALITYTYPE.
-
NumClusters [in]
-
Type: UINT
Number of clusters to use for compression.
-
NumPCA [in]
-
Type: UINT
Number of principal component analysis (PCA) basis vectors to use in each cluster.
-
pCB [in]
-
Type: LPD3DXSHPRTSIMCB
Optional pointer to the LPD3DXSHPRTSIMCB callback function that is used to compute the percentage of PRT compression computations completed. The callback function must be implemented to return S_OK to keep running the compression routine. Any other value will halt compression. May be NULL.
-
lpUserContext [in]
-
Type: LPVOID
Optional pointer to a user-defined value passed to the LPD3DXSHPRTSIMCB callback function. Typically used by an application to pass a pointer to a data structure that provides context information for the callback function. May be NULL.
-
pBuffer [in]
-
Type: LPD3DXPRTBUFFER
Address of a pointer to the uncompressed ID3DXPRTBuffer object that will be compressed.
-
ppBuffer [in, out]
-
Type: LPD3DXPRTCOMPBUFFER*
Address of a pointer to the output ID3DXPRTCompBuffer object.
Return value
Type: HRESULT
If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_OUTOFMEMORY.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|
See also