EffectTechniqueBindingUpdate Method |
Namespace: DigitalRune.Graphics.Effects
The method Update(RenderContext) is called when an object needs to be rendered using an Effect. Based on the information given in the render context, the method selects the effect technique that should be used for rendering. The selected technique is not yet set as the active technique - the information is only stored internally in the EffectTechniqueBinding. The method also updates the property Id, which can be used for state sorting.
Immediately before rendering the object, the renderer can call GetTechnique(Effect, RenderContext), which returns the effect technique that should be used. The renderer can set the returned technique as the CurrentTechnique of the Effect.
Notes to Inheritors: The method Update(RenderContext) calls OnUpdate(RenderContext), which can be overridden in derived classes. The base implementation selects the first technique found in the current Effect. Id is always 0.