Fixed few problems with render pipeline.

This commit is contained in:
Michel Fedde 2021-03-19 22:57:10 +01:00
parent e24f7ebfb9
commit a9c53a1e52
5 changed files with 19 additions and 45 deletions

View file

@ -1,5 +1,7 @@
using SM.Base.Shaders;
using OpenTK.Graphics.OpenGL4;
using SM.Base.Shaders;
using SM.Base.Window;
using SM.OGL.Framebuffer;
using SM2D.Shader;
namespace SM2D.Pipelines
@ -12,7 +14,8 @@ namespace SM2D.Pipelines
/// <summary>
/// The access to the pipeline.
/// </summary>
public static Basic2DPipeline Pipeline = new Basic2DPipeline();
public static Basic2DPipeline Pipeline =
new Basic2DPipeline();
/// <inheritdoc />
public override MaterialShader DefaultShader { get; protected set; } = ShaderCollection.Instanced;
@ -22,6 +25,8 @@ namespace SM2D.Pipelines
/// <inheritdoc />
protected override void RenderProcess(ref DrawContext context)
{
Framebuffer.Screen.Activate(FramebufferTarget.Framebuffer, ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
context.Scene?.Draw(context);
}
}