Effect.CurrentTechnique Property
Gets or sets the active technique.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
Syntax
public EffectTechnique CurrentTechnique { get; set; }
Property Value
The current technique.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | CurrentTechnique is null. CurrentTechnique cannot be null. |
Remarks
If there are multiple techiques in an effect and you want to use a new technique in the next pass, you must set CurrentTechnique to the new technique before making the rendering pass.
Note
The BasicEffect class, which is derived from Effect and inherits the Techniques collection, contains only one available technique to set as the active technique. The active technique applies the settings that have been set as the properties of the BasicEffect.
Example
effect.CurrentTechnique = effect.Techniques["TransformTechnique"];
See Also
Reference
Effect.Techniques Property
Effect Class
Effect Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Xbox 360, Windows 7, Windows Vista, Windows XP