'What is the proper way to change starting monitors with OpenTK?
I am trying to get the CurrentMonitor property of NativeWindowSettings to change which monitor it creates the window on. I'm trying to display on my secondary monitor, here is what I have:
var nativeWindowSettings = new NativeWindowSettings()
{
Size = new OpenTK.Mathematics.Vector2i(800, 600),
Title = "My Window",
Flags = OpenTK.Windowing.Common.ContextFlags.ForwardCompatible,
CurrentMonitor = new Monitors.GetMonitors()[1].Handle, //problem
};
using (var window = new Game(GameWindowSettings.Default, nativeWindowSettings))
{
window.Run();
}
I've tried creating a new Monitor Handle and assigning it to that, and I've tried creating a new MonitorHandle using the pointer from the second monitor in the array of monitors.
CurrentMonitor = new MonitorHandle(Monitors.GetMonitors()[1].Handle.Pointer),
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
