|Microsoft DirectX 9.0|
Begins the application of the technique.
UINT* pPasses, DWORD Flags );
- [out] Pointer to a value indicating the number of passes needed to render the current technique.
- [in] DWORD that determines if state modified by an effect is saved and restored. The default value 0 specifies that ID3DXEffect::Begin and ID3DXEffect::End will save and restore all state modified by the effect (including pixel and vertex shader constants). This flag parameter can be set to one or both of the following flags.
- D3DXFX_DONOTSAVESTATE - Device state is not saved and restored.
- D3DXFX_DONOTSAVESHADERSTATE - Shader device state is not saved and restored.
If the method succeeds, the return value is D3D_OK.
If the method fails, the return value can be one of the following values.
D3DERR_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value. D3DXERR_INVALIDDATA The data is invalid.
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.