Example #1
0
        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);
        }
Example #2
0
 public void Run()
 {
     currentScene = CreateAndInitializeScene(0);
     eye.RunLoop(window);
 }