EffectTechniqueBinding Class |
Namespace: DigitalRune.Graphics.Effects
The EffectTechniqueBinding type exposes the following members.
Name | Description | |
---|---|---|
EffectTechniqueBinding | Initializes a new instance of the EffectTechniqueBinding class |
Name | Description | |
---|---|---|
Clone |
Creates a new EffectTechniqueBinding that is a clone of the current instance.
| |
CloneCore |
Makes the instance a clone (deep copy) of the specified EffectTechniqueBinding.
| |
CreateInstanceCore |
When implemented in a derived class, creates a new instance of the
EffectTechniqueBinding derived class.
| |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetPassBinding |
Gets the effect pass binding for the specified effect technique.
| |
GetTechnique |
Gets the effect technique that should be used for rendering.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnGetTechnique |
Called when the effect technique that should be used for rendering should be returned.
| |
OnNextPass |
Called when next effect pass needs to be selected.
| |
OnUpdate |
Called when the effect technique needs to be selected and Id needs to be set.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Update |
Selects a technique for rendering the specified effect and sets the ID.
|
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.