Search Results for

    Show / Hide Table of Contents

    Class Material

    Graphics Material class.

    Inheritance
    object
    DisposableObject
    BaseMaterial
    Material
    Implements
    ILoadable
    IDisposable
    IDependencyObject
    Inherited Members
    BaseMaterial.graphicsContext
    BaseMaterial.effect
    BaseMaterial.activeDirectivesNames
    BaseMaterial.CBuffers
    BaseMaterial.CBuffersPerMaterial
    BaseMaterial.TextureSlots
    BaseMaterial.SamplerSlots
    BaseMaterial.UABuffers
    BaseMaterial.MaterialResourcesCache
    BaseMaterial.MaterialStateChanged
    BaseMaterial.isDestroying
    BaseMaterial.FireMaterialStateChanged()
    BaseMaterial.FireRenderLayerStateChanged(object, EventArgs)
    BaseMaterial.ActiveDirectivesNames
    BaseMaterial.Effect
    BaseMaterial.GetMaterialPassResources(string, bool)
    BaseMaterial.GetMaterialResources(string[], string, bool)
    BaseMaterial.Prepare(CommandBuffer)
    BaseMaterial.SetParameterValue(string, Type, byte[])
    BaseMaterial.SetTextureValue(Texture, string)
    BaseMaterial.SetSamplerValue(SamplerState, string)
    BaseMaterial.SetUABufferValue(Buffer, string)
    BaseMaterial.SetSBufferValue(Buffer, string)
    BaseMaterial.SetSBuffer(Buffer, int)
    BaseMaterial.SetUABuffer(Buffer, int)
    BaseMaterial.SetUATexture(Texture, int)
    BaseMaterial.IsPassRequiredWithActiveDirectives(string)
    DisposableObject.Disposed
    DisposableObject.Dispose()
    DisposableObject.Dispose(bool)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Evergine.Framework.Graphics
    Assembly: Evergine.Framework.dll
    Syntax
    public class Material : BaseMaterial, ILoadable, IDisposable, IDependencyObject

    Constructors

    Material(Effect)

    Initializes a new instance of the Material class.

    Declaration
    public Material(Effect effect)
    Parameters
    Type Name Description
    Effect effect

    Effect instance.

    Material(Effect, bool, bool)

    Initializes a new instance of the Material class.

    Declaration
    public Material(Effect effect, bool isTexturesDependencyLinkEnabled, bool isSamplersDependencyLinkEnabled)
    Parameters
    Type Name Description
    Effect effect

    Effect instance.

    bool isTexturesDependencyLinkEnabled

    if set to true the creation of texture dependency links are enabled.

    bool isSamplersDependencyLinkEnabled

    if set to true the creation of sampler dependency links are enabled.

    Properties

    AllowInstancing

    Gets or sets a value indicating whether this material allows instancing.

    Declaration
    public bool AllowInstancing { get; set; }
    Property Value
    Type Description
    bool

    Dependencies

    Gets the dependency list.

    Declaration
    public Lazy<List<IDependencyLink>> Dependencies { get; }
    Property Value
    Type Description
    Lazy<List<IDependencyLink>>

    Id

    Gets or sets the asset Id.

    Declaration
    public Guid Id { get; set; }
    Property Value
    Type Description
    Guid

    The asset path.

    LayerDescription

    Gets or sets the associated layer description.

    Declaration
    public RenderLayerDescription LayerDescription { get; set; }
    Property Value
    Type Description
    RenderLayerDescription

    LoadedFromAssetsService

    Gets a value indicating whether this material is loaded with the Asset Service.

    Declaration
    public bool LoadedFromAssetsService { get; }
    Property Value
    Type Description
    bool

    OrderBias

    Gets or sets the order bias of the material. This value is used to modify the rendering order of the meshes.

    Declaration
    [RenderPropertyAsInput(-512, 511, AsSlider = true, DesiredChange = 1, DesiredLargeChange = 5)]
    public int OrderBias { get; set; }
    Property Value
    Type Description
    int

    ReaderVersion

    Gets the reader version.

    Declaration
    public Version ReaderVersion { get; }
    Property Value
    Type Description
    Version

    The reader version.

    Methods

    Clone()

    Creates a copy of this Material and returns it.

    Declaration
    public Material Clone()
    Returns
    Type Description
    Material

    This material cloned.

    Destroy()

    Destroy all resources of this instance.

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

    InitilizeEffect(Effect)

    Initialize material with effect resources.

    Declaration
    protected override void InitilizeEffect(Effect effect)
    Parameters
    Type Name Description
    Effect effect

    Effect instance.

    Overrides
    BaseMaterial.InitilizeEffect(Effect)

    Invalidate(ILoadable)

    Invalidates this instance and raise the Invalidated event with the new ILoadable instance.

    Declaration
    public void Invalidate(ILoadable newInstance)
    Parameters
    Type Name Description
    ILoadable newInstance

    The new ILoadable instance.

    ReleaseUnusedMemory()

    Release unused memory.

    Declaration
    public void ReleaseUnusedMemory()

    SetSampler(SamplerState, int)

    Set sampler to the specified slot.

    Declaration
    public override void SetSampler(SamplerState sampler, int slot)
    Parameters
    Type Name Description
    SamplerState sampler

    The sampler.

    int slot

    The sampler slot.

    Overrides
    BaseMaterial.SetSampler(SamplerState, int)

    SetTexture(Texture, int)

    Sets a texture to the specified slot.

    Declaration
    public override void SetTexture(Texture texture, int slot)
    Parameters
    Type Name Description
    Texture texture

    The texture.

    int slot

    The texture slot.

    Overrides
    BaseMaterial.SetTexture(Texture, int)

    Events

    Invalidated

    Occurs when this instance has been invalidated and all references must be reloaded.

    Declaration
    public event EventHandler<ILoadable> Invalidated
    Event Type
    Type Description
    EventHandler<ILoadable>

    Implements

    ILoadable
    IDisposable
    IDependencyObject

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In This Article
    Back to top
    Generated by DocFX