Make Pal2Application handle Toolkit.Init() instead.
This commit is contained in:
@@ -12,7 +12,7 @@ using DB = Dashboard.Events;
|
|||||||
|
|
||||||
namespace Dashboard.OpenTK.PAL2
|
namespace Dashboard.OpenTK.PAL2
|
||||||
{
|
{
|
||||||
public class Pal2Application : Application
|
public class Pal2Application(ToolkitOptions? options = null) : Application
|
||||||
{
|
{
|
||||||
public override string DriverName => "Dashboard OpenTK PAL2.0 Driver";
|
public override string DriverName => "Dashboard OpenTK PAL2.0 Driver";
|
||||||
public override string DriverVendor => "Dashboard";
|
public override string DriverVendor => "Dashboard";
|
||||||
@@ -50,6 +50,8 @@ namespace Dashboard.OpenTK.PAL2
|
|||||||
});
|
});
|
||||||
|
|
||||||
EventQueue.EventRaised += OnEventRaised;
|
EventQueue.EventRaised += OnEventRaised;
|
||||||
|
|
||||||
|
Toolkit.Init(options ?? new ToolkitOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void RemoveWindow(PhysicalWindow window)
|
internal void RemoveWindow(PhysicalWindow window)
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ using OpenTK.Graphics.OpenGL;
|
|||||||
using OpenTK.Mathematics;
|
using OpenTK.Mathematics;
|
||||||
using OpenTK.Platform;
|
using OpenTK.Platform;
|
||||||
using TK = OpenTK.Platform.Toolkit;
|
using TK = OpenTK.Platform.Toolkit;
|
||||||
|
Application app = new Pal2Application(new ToolkitOptions()
|
||||||
TK.Init(new ToolkitOptions()
|
|
||||||
{
|
{
|
||||||
ApplicationName = "DashTerm",
|
ApplicationName = "DashTerm",
|
||||||
Windows = new ToolkitOptions.WindowsOptions()
|
Windows = new ToolkitOptions.WindowsOptions()
|
||||||
@@ -20,9 +19,7 @@ TK.Init(new ToolkitOptions()
|
|||||||
IsDPIAware = true,
|
IsDPIAware = true,
|
||||||
},
|
},
|
||||||
FeatureFlags = ToolkitFlags.EnableOpenGL,
|
FeatureFlags = ToolkitFlags.EnableOpenGL,
|
||||||
});
|
})
|
||||||
|
|
||||||
Application app = new Pal2Application()
|
|
||||||
{
|
{
|
||||||
GraphicsApiHints = new OpenGLGraphicsApiHints()
|
GraphicsApiHints = new OpenGLGraphicsApiHints()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user