private void Keyboard_KeyDown(object sender, KeyboardKeyEventArgs e) { if (e.Key == Key.Escape) { this.CleanUp(); this.Exit(); } if (e.Key == Key.Space) { Leo.SetStereo(!Leo.IsStereoSwitchedOn()); } if (e.Key == Key.F11) { if (this.WindowState == WindowState.Fullscreen) { this.WindowState = WindowState.Normal; } else { this.WindowState = WindowState.Fullscreen; } } }
private void CleanUp() { Leo.SetStereo(false); LGL.DeleteContext(context); OpenTK.Graphics.Glu.DeleteQuadric(sphere); OpenTK.Graphics.Glu.DeleteQuadric(cylinder); }