![]() |
![]() |
![]() |
Begins a pass, within the active technique.
Syntax
HRESULT BeginPass(
UINT Pass );
Parameters
- Pass
- [in] A zero-based integer index into the technique.
Return Value
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.
Remarks
An application sets one active pass (within one active technique) in the effect system by calling ID3DXEffect::BeginPass. An application signals the end of the active pass by calling ID3DXEffect::EndPass. ID3DXEffect::BeginPass and ID3DXEffect::EndPass must occur in a matching pair, within a matching pair of ID3DXEffect::Begin and ID3DXEffect::End calls.
If the application changes any effect state using any of the Effect::Setx methods inside of a ID3DXEffect::BeginPass/ID3DXEffect::EndPass matching pair, the application must call ID3DXEffect::CommitChanges to set the update the device with the state changes. If no state changes occur within a ID3DXEffect::BeginPass and ID3DXEffect::EndPass matching pair, it is not necessary to call ID3DXEffect::CommitChanges.