D3DXCreatePRTCompBuffer
Creates a compressed precomputed radiance transfer (PRT) buffer from an uncompressed ID3DXPRTBuffer object. This function should be used with per-vertex or volume buffers.
HRESULT D3DXCreatePRTCompBuffer(
D3DXSHCOMPRESSQUALITYTYPE Quality,
UINT NumClusters,
UINT NumPCA,
LPD3DXSHPRTSIMCB pCB,
LPVOID lpUserContext,
LPD3DXPRTBUFFER pBuffer,
LPD3DXPRTCOMPBUFFER * ppBuffer
);
Parameters
- Quality
- [in] Quality of spherical harmonic (SH) compression. See D3DXSHCOMPRESSQUALITYTYPE.
- NumClusters
- [in] Number of clusters to use for compression.
- NumPCA
- [in] Number of principal component analysis (PCA) basis vectors to use in each cluster.
- pCB
- [in] 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] 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] Address of a pointer to the uncompressed ID3DXPRTBuffer object that will be compressed.
- ppBuffer
- [in, out] Address of a pointer to the output ID3DXPRTCompBuffer object.
Return Values
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
Header: Declared in D3dx9mesh.h.
See Also
D3DXCreatePRTBuffer, D3DXCreatePRTBufferTex