Table of Contents

Class Effect

Namespace
Microsoft.Xna.Framework.Graphics
Assembly
MonoGame.Framework.dll
public class Effect : GraphicsResource, IDisposable
Inheritance
Effect
Implements
Derived
Inherited Members

Constructors

Effect(Effect)

protected Effect(Effect cloneSource)

Parameters

cloneSource Effect

Effect(GraphicsDevice, byte[])

public Effect(GraphicsDevice graphicsDevice, byte[] effectCode)

Parameters

graphicsDevice GraphicsDevice
effectCode byte[]

Effect(GraphicsDevice, byte[], int, int)

public Effect(GraphicsDevice graphicsDevice, byte[] effectCode, int index, int count)

Parameters

graphicsDevice GraphicsDevice
effectCode byte[]
index int
count int

Properties

CurrentTechnique

public EffectTechnique CurrentTechnique { get; set; }

Property Value

EffectTechnique

Parameters

public EffectParameterCollection Parameters { get; }

Property Value

EffectParameterCollection

Techniques

public EffectTechniqueCollection Techniques { get; }

Property Value

EffectTechniqueCollection

Methods

Clone()

Returns a deep copy of the effect where immutable types are shared and mutable data is duplicated.

public virtual Effect Clone()

Returns

Effect

The cloned effect.

Remarks

Dispose(bool)

The method that derived classes should override to implement disposing of managed and native resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

True if managed objects should be disposed.

Remarks

Native resources should always be released regardless of the value of the disposing parameter.

GraphicsDeviceResetting()

Called before the device is reset. Allows graphics resources to invalidate their state so they can be recreated after the device reset. Warning: This may be called after a call to Dispose() up until the resource is garbage collected.

protected override void GraphicsDeviceResetting()

OnApply()

protected virtual void OnApply()