Click or drag to resize
DigitalRuneEffectTechniqueBinding Class
Selects a technique when rendering a certain effect.
Inheritance Hierarchy

Namespace: DigitalRune.Graphics.Effects
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public class EffectTechniqueBinding

The EffectTechniqueBinding type exposes the following members.

Constructors
  NameDescription
Public methodEffectTechniqueBinding
Initializes a new instance of the EffectTechniqueBinding class
Top
Methods
  NameDescription
Public methodClone
Creates a new EffectTechniqueBinding that is a clone of the current instance.
Protected methodCloneCore
Makes the instance a clone (deep copy) of the specified EffectTechniqueBinding.
Protected methodCreateInstanceCore
When implemented in a derived class, creates a new instance of the EffectTechniqueBinding derived class.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetPassBinding
Gets the effect pass binding for the specified effect technique.
Public methodGetTechnique
Gets the effect technique that should be used for rendering.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnGetTechnique
Called when the effect technique that should be used for rendering should be returned.
Protected methodOnNextPass
Called when next effect pass needs to be selected.
Protected methodOnUpdate
Called when the effect technique needs to be selected and Id needs to be set.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUpdate
Selects a technique for rendering the specified effect and sets the ID.
Top
Fields
  NameDescription
Public fieldStatic memberDefault
The default effect technique binding.
Top
Properties
  NameDescription
Public propertyId
Gets (or sets) an ID, which can be used for state-sorting.
Top
Remarks

An Effect may define several EffectTechniques for rendering objects. An EffectTechniqueBinding provides the logic that selects the appropriate technique when rendering a specific object.

This base class always chooses the first technique of an effect and ignores other techniques. Derived EffectTechniqueBinding class should implement more useful strategies.

Once a technique is selected, the method GetPassBinding(EffectTechnique, RenderContext) can be called. This methods returns an EffectPassBinding. The EffectPassBinding can be used to iterate over all effect passes that need to be applied for the current object.

Cloning:
EffectTechniqueBindings need to be cloneable. The method Clone calls CreateInstanceCore and CloneCore(EffectTechniqueBinding) which are responsible for creating a clone of the current instance. Classes that derive from EffectTechniqueBinding need to provide the implementation for CreateInstanceCore and override CloneCore(EffectTechniqueBinding) if necessary.

See Also