Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    Material Class

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

    A compiled version of MaterialDescriptor.

    System.Object → Material
    Derived from Material:

    [DataSerializerGlobal(typeof(ReferenceSerializer<Material>), null, DataSerializerGenericMode.None, false, false, Profile = "Content")]
    [ContentSerializer(typeof(DataContentSerializer<Material>))]
    [DataContract]
    public class Material
    Name Description
    Constructors
    Material()

    Initializes a new instance of the Material class.

    Properties
    Descriptor

    Gets or sets the descriptor (this field is null at runtime).

    Passes

    The passes contained in this material (usually one).

    Methods
    New(GraphicsDevice, MaterialDescriptor)

    Creates a new material from the specified descriptor.

    | Improve this Doc View Source

    Constructors


    Material()

    Initializes a new instance of the Material class.

    public Material()
    | Improve this Doc View Source

    Properties


    Descriptor

    Gets or sets the descriptor (this field is null at runtime).

    public MaterialDescriptor Descriptor { get; set; }
    Property Value
    Type Description
    MaterialDescriptor

    The descriptor.


    Passes

    The passes contained in this material (usually one).

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

    Methods


    New(GraphicsDevice, MaterialDescriptor)

    Creates a new material from the specified descriptor.

    public static Material New(GraphicsDevice device, MaterialDescriptor descriptor)
    Parameters
    Type Name Description
    GraphicsDevice device
    MaterialDescriptor descriptor

    The material descriptor.

    Returns
    Type Description
    Material

    An instance of a Material.

    Exceptions
    Type Condition
    System.ArgumentNullException

    descriptor

    System.InvalidOperationException

    If an error occurs with the material description


    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