ID3DXPRTEngine::SetCallBack

Sets a pointer to an optional callback function that computes the percentage of spherical harmonic (SH) computations completed and gives the caller the option of aborting the simulator.

HRESULT SetCallBack(
  LPD3DXSHPRTSIMCB pCB,
  FLOAT Frequency,
  LPVOID lpUserContext
);

Parameters

pCB
[in] Pointer to the LPD3DXSHPRTSIMCB callback function that computes the percentage of SH computations completed. The callback function must be implemented to return S_OK to keep running the simulator. Any other value will abort the simulator.
Frequency
[in] Frequency of callback calls. The inverse of Frequency is approximately the number of times the callback function will be called.
lpUserContext
[in] Pointer to a user-defined value which is passed to the callback function. Typically used by an application to pass a pointer to a data structure that provides context information for the callback function.

Return Values

The return value is S_OK.

Requirements

Header: Declared in D3dx9mesh.h.