Loads and loads of small improvements I added while developing on my game

This commit is contained in:
Michel Fedde 2021-03-02 19:54:19 +01:00
parent 41421b1df9
commit a7c71e7ea1
107 changed files with 2278 additions and 1023 deletions

View file

@ -1,6 +0,0 @@
namespace SM2D.Pipelines
{
public class Adv2DPipeline
{
}
}

View file

@ -1,26 +1,23 @@
using System;
using OpenTK.Graphics.OpenGL4;
using SM.Base;
using SM.Base.Contexts;
using SM.Base.Drawing;
using SM.Base.Windows;
using SM.OGL.Framebuffer;
using SM2D.Shader;
namespace SM2D.Pipelines
{
public class Basic2DPipeline : RenderPipeline<Scene.Scene>
public class Basic2DPipeline : RenderPipeline
{
public static Basic2DPipeline Pipeline = new Basic2DPipeline();
public override MaterialShader DefaultShader { get; protected set; } = ShaderCollection.Instanced;
private Basic2DPipeline()
{
_defaultShader = Basic2DShader.Shader;
}
protected override void RenderProcess(ref DrawContext context, Scene.Scene scene)
protected override void RenderProcess(ref DrawContext context)
{
scene?.Draw(context);
context.Scene?.Draw(context);
}
}
}

View file

@ -1,48 +0,0 @@
#region usings
using System.Collections.Generic;
using OpenTK.Graphics.OpenGL4;
using SM.Base;
using SM.Base.Contexts;
using SM.Base.Scene;
using SM.OGL.Framebuffer;
using SM2D.Shader;
#endregion
namespace SM2D.Pipelines
{
public class Default2DPipeline : RenderPipeline<Scene.Scene>
{
public static Default2DPipeline Pipeline = new Default2DPipeline();
private Default2DPipeline()
{
}
protected override void Initialization(IGenericWindow window)
{
MainFramebuffer = CreateWindowFramebuffer();
}
protected override void RenderProcess(ref DrawContext context, Scene.Scene scene)
{
if (scene != null)
{
scene.DrawBackground(context);
scene.DrawMainObjects(context);
scene.DrawHUD(context);
scene.DrawDebug(context);
}
}
protected override void SceneChanged(Scene.Scene scene)
{
base.SceneChanged(scene);
}
}
}