diff --git a/LiveScanServer/OpenGLWindow.cs b/LiveScanServer/OpenGLWindow.cs index 0201d04..4063659 100644 --- a/LiveScanServer/OpenGLWindow.cs +++ b/LiveScanServer/OpenGLWindow.cs @@ -18,6 +18,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Globalization; +using System.Windows.Forms.Layout; using System.Diagnostics; @@ -43,6 +44,8 @@ namespace KinectServer static float KEYBOARD_MOVE_SPEED = 0.01f; + bool IsFullscreen = false; + static float MOUSE_ORBIT_SPEED = 0.30f; // 0 = SLOWEST, 1 = FASTEST static float MOUSE_DOLLY_SPEED = 0.2f; // same as above...but much more sensitive static float MOUSE_TRACK_SPEED = 0.003f; // same as above...but much more sensitive @@ -79,7 +82,7 @@ namespace KinectServer /// Creates a 800x600 window with the specified title. public OpenGLWindow() - : base(800, 600) + : base(800, 600, GraphicsMode.Default, "LiveScan") { this.VSync = VSyncMode.Off; MouseUp += new EventHandler(OnMouseButtonUp); @@ -88,7 +91,7 @@ namespace KinectServer MouseWheel += new EventHandler(OnMouseWheelChanged); KeyDown += new EventHandler(OnKeyDown); - + cameraPosition[0] = 0; cameraPosition[1] = 0; cameraPosition[2] = 1.0f; @@ -102,6 +105,22 @@ namespace KinectServer nTickCounter++; } + public void ToggleFullscreen() + { + if (IsFullscreen) + { + WindowBorder = WindowBorder.Resizable; + WindowState = WindowState.Normal; + ClientSize = new System.Drawing.Size(800, 600); + } + else + { + WindowBorder = WindowBorder.Hidden; + WindowState = WindowState.Fullscreen; + } + IsFullscreen = !IsFullscreen; + } + void OnKeyDown(object sender, KeyboardKeyEventArgs e) { // e.Key @@ -289,6 +308,8 @@ namespace KinectServer cameraPosition[2] += KEYBOARD_MOVE_SPEED; if (keyboard[Key.D]) cameraPosition[0] += KEYBOARD_MOVE_SPEED; + if (keyboard[Key.F]) + ToggleFullscreen(); lock (vertices) { diff --git a/bin/LiveScanClient.exe b/bin/LiveScanClient.exe index 14811a4..967af93 100644 Binary files a/bin/LiveScanClient.exe and b/bin/LiveScanClient.exe differ diff --git a/bin/LiveScanServer.exe b/bin/LiveScanServer.exe index e2684b7..579244c 100644 Binary files a/bin/LiveScanServer.exe and b/bin/LiveScanServer.exe differ