private void OpenWindow(Object sender, EventArgs e) { if (win != null && win.Exists) { win.Close(); } win = null; using (win = new Window(860, 640, "GL Graphics")) { //Run takes a double, which is how many frames per second it should strive to reach. //You can leave that out and it'll just update as fast as the hardware will allow it. win.Location = new Point(this.Location.X + this.Width + 20, this.Location.Y); win.Run(60.0); } }
private static void Main() { int desWidth = 1200, desHeight = 800; // Retrieve screen scaling factor float scale = GetScalingFactor(); // Scale window size so that it is displayed properly desWidth = (int)(desWidth / scale); desHeight = (int)(desHeight / scale); GraphicsMode mode = new GraphicsMode(new ColorFormat(24), 16, 8, 4, new ColorFormat(32), 2, false); using (var window = new Window(desWidth, desHeight, mode, "ManipuS")) { window.Run(60.0); } }