Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    EffectInstance Class

    Namespace: Stride.Rendering
    Assembly: Stride.Graphics.dll

    A dynamic effect instance, including its values and resources.

    System.Object → DisposeBase → EffectInstance
    Derived from EffectInstance: DynamicEffectInstance

    public class EffectInstance : DisposeBase, IDisposable, IReferencable
    Name Description
    Constructors
    EffectInstance(Effect, ParameterCollection)
    Fields
    effect
    permutationCounter
    Properties
    DescriptorReflection
    Effect
    Parameters
    RootSignature
    Methods
    Apply(GraphicsContext)
    ChooseEffect(GraphicsDevice)
    Destroy()
    UpdateEffect(GraphicsDevice)

    Compiles or recompiles the effect if necesssary.

    | Improve this Doc View Source

    Constructors


    EffectInstance(Effect, ParameterCollection)

    public EffectInstance(Effect effect, ParameterCollection parameters = null)
    Parameters
    Type Name Description
    Effect effect
    ParameterCollection parameters
    | Improve this Doc View Source

    Fields


    effect

    protected Effect effect
    Field Value
    Type Description
    Effect

    permutationCounter

    protected int permutationCounter
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Properties


    DescriptorReflection

    public EffectDescriptorSetReflection DescriptorReflection { get; }
    Property Value
    Type Description
    EffectDescriptorSetReflection

    Effect

    public Effect Effect { get; }
    Property Value
    Type Description
    Effect

    Parameters

    public ParameterCollection Parameters { get; }
    Property Value
    Type Description
    ParameterCollection

    RootSignature

    public RootSignature RootSignature { get; }
    Property Value
    Type Description
    RootSignature
    | Improve this Doc View Source

    Methods


    Apply(GraphicsContext)

    public void Apply(GraphicsContext graphicsContext)
    Parameters
    Type Name Description
    GraphicsContext graphicsContext

    ChooseEffect(GraphicsDevice)

    protected virtual void ChooseEffect(GraphicsDevice graphicsDevice)
    Parameters
    Type Name Description
    GraphicsDevice graphicsDevice

    Destroy()

    protected override void Destroy()
    Overrides
    DisposeBase.Destroy()

    UpdateEffect(GraphicsDevice)

    Compiles or recompiles the effect if necesssary.

    public bool UpdateEffect(GraphicsDevice graphicsDevice)
    Parameters
    Type Name Description
    GraphicsDevice graphicsDevice
    Returns
    Type Description
    System.Boolean

    True if the effect was recompiled, false otherwise.


    Inherited Members

    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation