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:
parent
97e638d9d9
commit
820d6ce700
34 changed files with 660 additions and 106 deletions
|
|
@ -5,13 +5,14 @@ using OpenTK.Input;
|
|||
using SM.Base;
|
||||
using SM.Base.Controls;
|
||||
using SM2D.Controls;
|
||||
using SM2D.Pipelines;
|
||||
using SM2D.Scene;
|
||||
using SM2D.Shader;
|
||||
using Vector2 = OpenTK.Vector2;
|
||||
|
||||
namespace SM2D
|
||||
{
|
||||
public class GLWindow2D : GenericWindow<Scene.Scene, I2DShowItem, Camera>
|
||||
public class GLWindow2D : GenericWindow<Scene.Scene, Camera>
|
||||
{
|
||||
public Vector2? Scaling { get; set; }
|
||||
public Vector2 WorldScale => _worldScale;
|
||||
|
|
@ -25,13 +26,17 @@ namespace SM2D
|
|||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
Defaults.DefaultShader = new Default2DShader();
|
||||
|
||||
base.OnLoad(e);
|
||||
GL.Enable(EnableCap.Blend);
|
||||
GL.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha);
|
||||
}
|
||||
|
||||
protected override void OnLoaded()
|
||||
{
|
||||
base.OnLoaded();
|
||||
SetRenderPipeline(new Basic2DPipeline());
|
||||
}
|
||||
|
||||
protected override void OnRenderFrame(FrameEventArgs e)
|
||||
{
|
||||
GL.Disable(EnableCap.DepthTest);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue