diff --git a/src/DotRecast.Silk/Program.cs b/src/DotRecast.Silk/Program.cs index 1b3e80d..9b67e20 100644 --- a/src/DotRecast.Silk/Program.cs +++ b/src/DotRecast.Silk/Program.cs @@ -1,4 +1,5 @@ using System; +using DotRecast.Silk; using Serilog; using Serilog.Enrichers; @@ -21,6 +22,7 @@ public class Program outputTemplate: format) .CreateLogger(); - Log.Logger.Information("Hello, World!"); + var demo = new SilkDemo(); + demo.Run(); } } \ No newline at end of file diff --git a/src/DotRecast.Silk/SilkDemo.cs b/src/DotRecast.Silk/SilkDemo.cs index 92b7ede..8ed99bc 100644 --- a/src/DotRecast.Silk/SilkDemo.cs +++ b/src/DotRecast.Silk/SilkDemo.cs @@ -1,8 +1,63 @@ using Serilog; +using Silk.NET.Maths; +using Silk.NET.Windowing; namespace DotRecast.Silk; public class SilkDemo { private static readonly ILogger Logger = Log.ForContext(); + + private IWindow _win; + + public void Run() + { + Log.Logger.Information("running"); + + var options = WindowOptions.Default; + options.Title = "silk demo"; + options.Size = new Vector2D(1024, 768); + options.VSync = false; + //options.ShouldSwapAutomatically = false; + _win = Window.Create(options); + + _win.Closing += OnWindowClosing; + _win.Load += OnWindowLoad; + _win.Resize += OnWindowResize; + _win.FramebufferResize += OnWindowFramebufferResize; + _win.Update += OnWindowUpdate; + _win.Render += OnWindowRender; + + _win.Run(); + } + + private void OnWindowClosing() + { + + } + + private void OnWindowLoad() + { + + } + + private void OnWindowResize(Vector2D size) + { + + } + + private void OnWindowFramebufferResize(Vector2D size) + { + + } + + private void OnWindowUpdate(double dt) + { + + } + + private void OnWindowRender(double dt) + { + + } } \ No newline at end of file