Click or drag to resize
DigitalRuneEffectTechniqueBindingUpdate Method
Selects a technique for rendering the specified effect and sets the ID.

Namespace: DigitalRune.Graphics.Effects
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public void Update(
	RenderContext context
)

Parameters

context
Type: DigitalRune.GraphicsRenderContext
The render context.
Remarks

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.

See Also