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,39 +1,40 @@
using System.Collections.Generic;
using OpenTK.Graphics.OpenGL4;
using SM.Base;
using SM.Base.Contexts;
using SM.Base;
using SM.Base.Drawing;
using SM.Base.PostEffects;
using SM.Base.Windows;
using SM.OGL.Framebuffer;
using SM2D.Scene;
namespace SM_TEST
{
public class TestRenderPipeline : RenderPipeline<Scene>
public class TestRenderPipeline : RenderPipeline
{
private BloomEffect _bloom;
protected override void Initialization(GenericWindow window)
public override void Initialization()
{
base.Initialization(window);
_bloom = new BloomEffect(1);
MainFramebuffer = CreateWindowFramebuffer();
_bloom.Initilize(this);
base.Initialization();
}
protected override void RenderProcess(ref DrawContext context, Scene scene)
protected override void RenderProcess(ref DrawContext context)
{
MainFramebuffer.Activate(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
scene.DrawBackground(context);
scene.DrawMainObjects(context);
context.Scene.DrawBackground(context);
context.Scene.DrawMainObjects(context);
Framebuffer.Screen.Activate(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
_bloom.Draw(context);
scene.DrawHUD(context);
scene.DrawDebug(context);
context.Scene.DrawHUD(context);
context.Scene.DrawDebug(context);
}
}
}