Export (0) Print
Expand All

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)

public EffectTechnique CurrentTechnique { get; set; }

Property Value

The current technique.

Exception typeCondition

CurrentTechnique is null. CurrentTechnique cannot be null.

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.

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.

effect.CurrentTechnique = effect.Techniques["TransformTechnique"];

Xbox 360, Windows 7, Windows Vista, Windows XP, Windows Phone 7

Community Additions

© 2015 Microsoft