30.09.2020
+ Mouse support + Started to add summaries to SM.Base
This commit is contained in:
parent
16366fa015
commit
7acdba92f8
21 changed files with 325 additions and 58 deletions
|
|
@ -4,9 +4,18 @@ using SM.OGL.Mesh;
|
|||
|
||||
namespace SM.Base.Scene
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains general basis systems for drawing objects.
|
||||
/// </summary>
|
||||
public abstract class DrawingBasis : IShowItem
|
||||
{
|
||||
/// <summary>
|
||||
/// The material it should use.
|
||||
/// </summary>
|
||||
protected Material _material = new Material();
|
||||
/// <summary>
|
||||
/// The mesh it should use.
|
||||
/// </summary>
|
||||
protected GenericMesh _mesh = Defaults.DefaultMesh;
|
||||
public virtual void Update(UpdateContext context)
|
||||
{
|
||||
|
|
@ -14,14 +23,25 @@ namespace SM.Base.Scene
|
|||
}
|
||||
|
||||
public virtual void Draw(DrawContext context)
|
||||
{ }
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Applies the current settings to the context.
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
protected void ApplyContext(ref DrawContext context)
|
||||
{
|
||||
_material.Shader ??= Defaults.DefaultShader;
|
||||
|
||||
context.Material = _material;
|
||||
context.Mesh = _mesh;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Contains general basis systems for drawing objects.
|
||||
/// </summary>
|
||||
/// <typeparam name="TTransformation">The transformation type</typeparam>
|
||||
public abstract class DrawingBasis<TTransformation> : DrawingBasis
|
||||
where TTransformation : GenericTransformation, new()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue