04.10.2020

+ render pipeline system for more control about the renderering.
+ Log system
+ Framebuffer system

~ Default shader was moved to pipelines.
This commit is contained in:
Michel Fedde 2020-10-04 16:31:48 +02:00
parent 97e638d9d9
commit 820d6ce700
34 changed files with 660 additions and 106 deletions

View file

@ -25,20 +25,21 @@ namespace SM.Base.Scene
}
/// <inheritdoc />
public virtual void Draw(DrawContext context)
public void Draw(DrawContext context)
{
context.Material = _material;
context.Mesh = _mesh;
DrawContext(ref context);
}
/// <summary>
/// Applies the current settings to the context.
/// Draws the context, that was given to them.
/// </summary>
/// <param name="context"></param>
protected void ApplyContext(ref DrawContext context)
protected virtual void DrawContext(ref DrawContext context)
{
_material.Shader ??= Defaults.DefaultShader;
context.Material = _material;
context.Mesh = _mesh;
}
}
/// <summary>

View file

@ -18,9 +18,8 @@ namespace SM.Base.Scene
public Color4 Tint = Color4.White;
/// <summary>
/// A shader, that is used to draw this material.
/// <para>Default: Defaults.DefaultShaders </para>
/// A custom shader, that is used to draw this material.
/// </summary>
public IShader Shader = Defaults.DefaultShader;
public IShader CustomShader;
}
}