[Examples] Added keys to modify timing
authorStefanos A. <stapostol@gmail.com>
Tue, 7 Jan 2014 21:09:52 +0000 (22:09 +0100)
committerStefanos A. <stapostol@gmail.com>
Tue, 7 Jan 2014 21:09:52 +0000 (22:09 +0100)
Use [ and ] to decrease and increase the UpdateFrame frequency.
Use < and > to decrease and increase the RenderFrame frequency.

Source/Examples/OpenTK/Test/GameWindowStates.cs

index 05289ea..10ae314 100644 (file)
@@ -86,6 +86,11 @@ namespace Examples.Tests
                 case Key.V:
                     VSync = VSync == VSyncMode.On ? VSyncMode.Off : VSyncMode.On;
                     break;
+
+                case Key.BracketLeft: TargetUpdateFrequency--; break;
+                case Key.BracketRight: TargetUpdateFrequency++; break;
+                case Key.Comma: TargetRenderFrequency--; break;
+                case Key.Period: TargetRenderFrequency++; break;
             }
         }
 
@@ -356,7 +361,7 @@ namespace Examples.Tests
             using (GameWindowStates ex = new GameWindowStates())
             {
                 Utilities.SetWindowTitle(ex);
-                               ex.Run(30.0);
+                ex.Run(30.0);
             }
         }
     }