Click or drag to resize
DigitalRuneEffectParameterBindingApply Method
Applies the value to the effect parameter.

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

Parameters

context
Type: DigitalRune.GraphicsRenderContext
The render context.
Exceptions
ExceptionCondition
EffectBindingException Unable to apply effect parameter.
Remarks

This method sets the shader constant to the value that was calculated in Update(RenderContext). Apply(RenderContext) needs to be called after Update(RenderContext) before the object that uses the Effect is rendered.

This method calls OnApply(RenderContext) which needs to be implemented in derived classes and is responsible for assigning the value that was calculated in Update(RenderContext) to Parameter by using the appropriate EffectParameter.SetValue() method.

See Also