ID3DXEffect::BeginPass method

Begins a pass, within the active technique.

Syntax

HRESULT BeginPass(
  [in] UINT Pass
);

Parameters

Pass [in]

Type: UINT

A zero-based integer index into the technique.

Return value

Type: HRESULT

If the method succeeds, the return value is D3D_OK. If the method fails, the return value can be one of the following: D3DERR_INVALIDCALL, D3DXERR_INVALIDDATA.

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.

Requirements

Requirement Value
Header
D3DX9Effect.h
Library
D3dx9.lib

See also

ID3DXEffect