Search Results for

    Show / Hide Table of Contents

    Class EffectFromCode

    Effect from shader code.

    Inheritance
    object
    DisposableObject
    Effect
    EffectFromCode
    Implements
    ILoadable
    IDependencyObject
    Inherited Members
    Effect.directivesGroups
    Effect.passes
    Effect.techniquesCached
    Effect.graphicsContext
    Effect.graphicsResourcesInfo
    Effect.ConstantBufferPool
    Effect.sharedCBufferBySlot
    Effect.SharedCBufferBySlot
    Effect.Directives
    Effect.Passes
    Effect.GraphicsResourcesInfo
    Effect.Id
    Effect.ReaderVersion
    Effect.Dependencies
    Effect.Invalidated
    Effect.CreateSharedResources()
    Effect.Invalidate(ILoadable)
    Effect.GetResourceLayout(GraphicsResourceUsage[])
    Effect.ReleaseUnusedMemory()
    DisposableObject.Disposed
    DisposableObject.Dispose()
    DisposableObject.Dispose(bool)
    Namespace: Evergine.Framework.Graphics.Effects
    Assembly: Evergine.Framework.dll
    Syntax
    public class EffectFromCode : Effect, ILoadable, IDependencyObject

    Constructors

    EffectFromCode(GraphicsContext, string)

    Initializes a new instance of the EffectFromCode class.

    Declaration
    public EffectFromCode(GraphicsContext graphicsContext, string shaderSource)
    Parameters
    Type Name Description
    GraphicsContext graphicsContext

    Graphics context.

    string shaderSource

    Shader source.

    EffectFromCode(GraphicsContext, string, string, string[], bool)

    Initializes a new instance of the EffectFromCode class.

    Declaration
    public EffectFromCode(GraphicsContext graphicsContext, string shaderSource, string passName = null, string[] activeDirectives = null, bool lazyInitialization = false)
    Parameters
    Type Name Description
    GraphicsContext graphicsContext

    Graphics context.

    string shaderSource

    Shader source.

    string passName

    Active pass.

    string[] activeDirectives

    Active directives.

    bool lazyInitialization

    Lazy initialization. Compile shaders in the initialization or on-demand.

    Fields

    analyzer

    The analyzer.

    Declaration
    protected ShaderAnalyzer analyzer
    Field Value
    Type Description
    ShaderAnalyzer

    compiler

    The compiler.

    Declaration
    protected ShaderCompiler compiler
    Field Value
    Type Description
    ShaderCompiler

    shaderSource

    The shader source.

    Declaration
    protected string shaderSource
    Field Value
    Type Description
    string

    Properties

    EffectType

    Gets the effect type.

    Declaration
    public override ShaderAnalyzer.EffectTypes EffectType { get; }
    Property Value
    Type Description
    ShaderAnalyzer.EffectTypes
    Overrides
    Effect.EffectType

    Methods

    Destroy()

    Destroy all resources of this instance.

    Declaration
    protected override void Destroy()
    Overrides
    Effect.Destroy()

    GetEffectTechnique(string, string[])

    Gets Effect Technique with a specific directives group.

    Declaration
    public override EffectTechnique GetEffectTechnique(string passName, string[] activeDirectives)
    Parameters
    Type Name Description
    string passName

    Pass name.

    string[] activeDirectives

    Active directives.

    Returns
    Type Description
    EffectTechnique

    Effect technique.

    Overrides
    Effect.GetEffectTechnique(string, string[])

    IsPassRequiredWithDirectives(string, string[])

    Gets if the pass is required with current active directives.

    Declaration
    public override bool IsPassRequiredWithDirectives(string passName, string[] activeDirectives)
    Parameters
    Type Name Description
    string passName

    Pass Name.

    string[] activeDirectives

    Active Directives.

    Returns
    Type Description
    bool

    If the pass is required or not.

    Overrides
    Effect.IsPassRequiredWithDirectives(string, string[])

    SelectPass(string)

    Selects the pass.

    Declaration
    protected PassSection SelectPass(string passName)
    Parameters
    Type Name Description
    string passName

    Name of the pass.

    Returns
    Type Description
    PassSection

    The selected pass section.

    Implements

    ILoadable
    IDependencyObject

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In this article
    Back to top
    Generated by DocFX