Exemple #1
0
 public static void Render(GameTime gameTime)
 {
     Screen.Render();
     DebugRenderer.Draw();
     ScreenEffects.Instance.Draw();
     GameConsole.Render();
     DebugRenderer.DrawText();
     _fpsCounter.Draw(gameTime);
 }
Exemple #2
0
        public static void Render(GameTime gameTime)
        {
            Device.SetRenderTarget(screenshot);
            Device.DepthStencilState = new DepthStencilState()
            {
                DepthBufferEnable = true
            };
            Screen.Render();
            DebugRenderer.Draw();
            ScreenEffects.Instance.Draw();
            GameConsole.Render();
            DebugRenderer.DrawText();
            _fpsCounter.Draw(gameTime);
            Device.SetRenderTarget(null);

            //redraw everything to window
            Device.Clear(Color.Black);
            SpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend,
                              SamplerState.LinearClamp, DepthStencilState.Default,
                              RasterizerState.CullNone);
            SpriteBatch.Draw(screenshot, new Rectangle(0, 0, Device.PresentationParameters.BackBufferWidth, Device.PresentationParameters.BackBufferHeight), Color.White);

            SpriteBatch.End();
        }