/Rendering/Basics/Materials/Material.cs
C# | 52 lines | 23 code | 3 blank | 26 comment | 0 complexity | 5e2bdd39fcc80dca06eddbfe10c3a1bd MD5 | raw file
Possible License(s): Apache-2.0
- using System;
- using Delta.ContentSystem.Rendering;
- using Delta.Graphics.Basics;
-
- namespace Delta.Rendering.Basics.Materials
- {
- /// <summary>
- /// Material class, just derived from the BaseMaterial class, which contains
- /// all the functionality for drawing and animations. Note: For 2D rendering
- /// use Material2D, which does not share this class, but all the BaseMaterial
- /// functionality.
- /// </summary>
- public class Material : BaseMaterial
- {
- #region Constructors
- /// <summary>
- /// Create material with just a diffuse map and a shader. Will check if
- /// the diffuse map is an animation set and load all animated images
- /// automatically (use StartAnimation to control it).
- /// </summary>
- /// <param name="setDiffuseMapName">Diffuse map name.</param>
- /// <param name="setShader">Shader to use during rendering.</param>
- public Material(string setDiffuseMapName, Shader setShader)
- : base(setDiffuseMapName, setShader)
- {
- }
-
- /// <summary>
- /// Special constructor to allow creating a material just with a single
- /// diffuse map image (e.g. created from RenderToTexture).
- /// </summary>
- /// <param name="setDiffuseMap">Diffuse texture to use.</param>
- /// <param name="setShader">The shader to use.</param>
- public Material(Texture setDiffuseMap, Shader setShader)
- : base(setDiffuseMap, setShader)
- {
- }
-
- /// <summary>
- /// Create material from MaterialData, only used internally, for example
- /// for loading Models from ModelData (they contain a list of MaterialData)
- /// </summary>
- /// <param name="setData">
- /// The <see cref="MaterialData"/> to use during rendering.
- /// </param>
- public Material(MaterialData setData)
- : base(setData)
- {
- }
- #endregion
- }
- }