Microsoft DirectX 8.1 (C++)

ID3DXEffect::Begin

Begins the application of the technique.

HRESULT Begin(
  UINT* pPasses,
  DWORD Flags
);

Parameters

pPasses
[out, retval] Pointer to a value indicating the number of passes needed to render the current technique.
Flags
[in] A DWORD that determines if state modified by an effect is saved and restored. The default value 0 specifies that Begin and End will save and restore all state modified by the effect. Otherwise, set this flag to D3DXFX_DONOTSAVESTATE. State is never saved or restored between passes.

Return Values

This method always returns the value S_OK.

Remarks

This method returns the number of passes needed to render the technique. The application must incrementally call ID3DXEffect::Pass for each pass before drawing the geometry to which the effect needs to be applied. After all passes are rendered, ID3DXEffect::End must be called.

Requirements

  Header: Declared in D3dx8effect.h.
  Import Library: Use D3dx8.lib.

See Also

ID3DXEffect::End, ID3DXEffect::Pass