EffectParameterBindingUpdate Method |
Namespace: DigitalRune.Graphics.Effects
This method is called usually once per frame to update the parameter value. Update(RenderContext) calls OnUpdate(RenderContext) which needs to be implemented in derived classes. When the effect parameter is dynamic and needs to be recalculated each frame before rendering, OnUpdate(RenderContext) can be used to compute the new parameter value. When the effect parameter is static then OnUpdate(RenderContext) can be empty.
The method Update(RenderContext) only calculates the new value and stores it internally. The Apply(RenderContext) then sets the value in the target parameter (see Parameter).
Update(RenderContext) needs to be called before Apply(RenderContext).