Table of Contents

Class Material

Namespace
Stride.Rendering
Assembly
Stride.Rendering.dll

A compiled version of MaterialDescriptor.

[DataSerializerGlobal(typeof(ReferenceSerializer<Material>), null, DataSerializerGenericMode.None, false, false, Profile = "Content")]
[ContentSerializer(typeof(DataContentSerializer<Material>))]
[DataContract]
public class Material
Inheritance
object
Material
Extension Methods

Constructors

Material()

Initializes a new instance of the Material class.

public Material()

Properties

Descriptor

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

public MaterialDescriptor Descriptor { get; set; }

Property Value

MaterialDescriptor

The descriptor.

Passes

The passes contained in this material (usually one).

public MaterialPassCollection Passes { get; }

Property Value

MaterialPassCollection

Methods

New(GraphicsDevice, MaterialDescriptor, ContentManager)

Creates a new material from the specified descriptor.

public static Material New(GraphicsDevice device, MaterialDescriptor descriptor, ContentManager content = null)

Parameters

device GraphicsDevice
descriptor MaterialDescriptor

The material descriptor.

content ContentManager

The content manager that loads the assets the material's features reference, such as Game.Content. Without one, those references stay empty objects and the material reports each one it could not load.

Returns

Material

An instance of a Material.

Exceptions

ArgumentNullException

descriptor

InvalidOperationException

If an error occurs with the material description