CommitChanges
CommitChanges
현재 테크닉에서 ID3DXEffect::BeginPass/ID3DXEffect::EndPass 가 매칭되는 내부에서 ID3DXEffect::Set~ 함수를 쓰지 않았다면
ID3DXEffect::CommitChanges 를 할필요가 없고 BeginPass, EndPass 내부에서 ID3DXEffect::Set~ 함수가 쓰인다면
Remarks
If the application changes any effect state using any of the ID3DXEffect::Setx methods inside of an ID3DXEffect::BeginPass/ID3DXEffect::EndPass matching pair, the application must call ID3DXEffect::CommitChanges before any DrawxPrimitive call to propagate state changes to the device before rendering. If no state changes occur within a ID3DXEffect::BeginPass and ID3DXEffect::EndPass matching pair, it is not necessary to call ID3DXEffect::CommitChanges.
This is slightly different for any shared parameters in a cloned effect. When a technique is active on a cloned effect (that is, when ID3DXEffect::Begin has been called but and ID3DXEffect::End has not been called), ID3DXEffect::CommitChanges updates parameters that are not shared as expected. To update a shared parameter (only for a cloned effect whose technique is active), call ID3DXEffect::End to deactivate the technique and ID3DXEffect::Begin to reactivate the technique before calling ID3DXEffect::CommitChanges.
// Using current technique
// Begin starts active technique
// BeginPass begins a pass
// CommitChanges updates changes to any set calls in the pass. This should be called before any DrawPrimitive call to d3d
// EndPass ends a pass
// End ends active technique
이건 에 대한 d3dx9effect.h 에 있는 설명 에 있다