protected virtual void NewFrame(IRealTime realTime) { if (window.Input.Keyboard.KeyReleased(Keys.F)) { SwapChainDescription sd; eye.Device.PrimarySwapChain.GetDescription(out sd); var dm = desctopDisplayMode; sd.ColorBufferFormatID = dm.FormatID; eye.Device.PrimarySwapChain.ResetToFullscreen(ref dm, ref sd); } else if (window.Input.Keyboard.KeyReleased(Keys.W)) { SwapChainDescription sd; eye.Device.PrimarySwapChain.GetDescription(out sd); eye.Device.PrimarySwapChain.Reset(ref sd); } else if (window.Input.Keyboard.KeyReleased(Keys.P)) { SwapChainDescription sd; eye.Device.PrimarySwapChain.GetDescription(out sd); eye.Device.PrimarySwapChain.ResetToPseudoFullscreen(ref sd); } for (int i = 0; i <= 6; i++) if (window.Input.Keyboard.KeyPressed(Keys.D0 + i)) currentScene = CreateAndInitializeScene(i); currentScene.NewFrame(realTime); }
public void Run() { currentScene = CreateAndInitializeScene(0); eye.RunLoop(window); }