Search Results for

    Show / Hide Table of Contents

    Class EffectFromCode

    Effect from the 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. Compiles shaders during 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 source of the shader.

    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

    CollectDirectives()

    Gets if the pass is required with the current active directives.

    Declaration
    protected override DirectivesGroup[] CollectDirectives()
    Returns
    Type Description
    DirectivesGroup[]

    Directives group array.

    Overrides
    Effect.CollectDirectives()

    Destroy()

    Destroys all resources of this instance.

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

    GetEffectTechnique(string, string[])

    Gets the Effect Technique with a specific directives group.

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

    The pass name.

    string[] activeDirectives

    The active directives.

    Returns
    Type Description
    EffectTechnique

    The effect technique.

    Overrides
    Effect.GetEffectTechnique(string, string[])

    GetIncludes()

    Return the includes detected on the effect.

    Declaration
    public HashSet<IncludeLibrary> GetIncludes()
    Returns
    Type Description
    HashSet<IncludeLibrary>

    The IncludeLibrary collection.

    GetLibrarySection()

    Return the librarySection on the effect (Only valid when the effect is library type).

    Declaration
    public LibrarySection GetLibrarySection()
    Returns
    Type Description
    LibrarySection

    The librarySection.

    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

    Whether the pass is required.

    Overrides
    Effect.IsPassRequiredWithDirectives(string, string[])

    SelectPass(string)

    Selects the pass.

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

    The 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