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

@ -3,9 +3,8 @@ using OpenTK.Graphics;
using OpenTK.Input;
using SM.Base;
using SM.Base.Window;
using SM.Game.Controls;
using SM2D;
using SM2D.Drawing;
using SM2D.Pipelines;
using SM2D.Scene;
using Font = SM.Base.Drawing.Text.Font;
using Vector2 = OpenTK.Vector2;
@ -19,20 +18,10 @@ namespace SM_TEST
private static GLWindow window;
static void Main(string[] args)
{
font = new Font(@"C:\Windows\Fonts\Arial.ttf")
{
FontSize = 16
};
//Log.SetLogFile(compressionFolder:"logs");
window = new GLWindow {VSync = VSyncMode.Off};
window = new GLWindow();
window.ApplySetup(new Window2DSetup());
window.SetRenderPipeline(new TestRenderPipeline());
window.SetRenderPipeline(Basic2DPipeline.Pipeline);
window.SetScene(scene = new Scene());
window.RunFixedUpdate(60);
window.Load += WindowOnLoad;
window.RenderFrame += WindowOnUpdateFrame;
window.Run();
}
@ -41,19 +30,6 @@ namespace SM_TEST
}
private static void WindowOnLoad(IGenericWindow window)
{
scene.ShowAxisHelper = true;
//scene.Background.Color = Color4.White;
DrawObject2D box = new DrawObject2D();
scene.Objects.Add(box);
DrawText text = new DrawText(font, "Test Text");
text.Transform.Position.Set(50, 0);
text.Transform.Size.Set(2);
scene.HUD.Add(text);
//particles.Trigger();
}
{ }
}
}