D3DXCreatePRTBufferTex
Microsoft DirectX 9.0 SDK Update (October 2004)

D3DXCreatePRTBufferTex Function


Creates a precomputed radiance transfer (PRT) buffer that can be compressed or filled by a simulator. This function should be used to create per-pixel buffers.

Syntax

HRESULT WINAPI D3DXCreatePRTBufferTex(      

    UINT Width,     UINT Height,     UINT NumCoeffs,     UINT NumChannels,     LPD3DXPRTBUFFER *ppBuffer );

Parameters

Width
[in] Width of the texture, in pixels.
Height
[in] Height of the texture, in pixels.
NumCoeffs
[in] Number of coefficients per sample location. When using spherical harmonic (SH) PRT, the number of coefficients should be Order2, where Order is the order of the SH evaluation. Order must be in the range of D3DXSH_MINORDER to D3DXSH_MAXORDER, inclusive. The degree of the evaluation is Order - 1.
NumChannels
[in] Number of color channels to set in the mesh. Set to 1 to specify gray materials (R = G = B), or 3 to enable color bleeding effects.
ppBuffer
[in, out] Address of a pointer to the created ID3DXPRTBuffer object.

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:

D3DERR_INVALIDCALLThe method call is invalid. For example, a method's parameter may have an invalid value.
E_OUTOFMEMORYDirect3D could not allocate sufficient memory to complete the call.


Remarks

When the buffer is created, all values are initialized to zero.

Function Information

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

See Also

D3DXCreatePRTBuffer


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.