/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { // Render to the Render Target GraphicsDevice.SetRenderTarget(_renderTarget); GraphicsDevice.Clear(Color.CornflowerBlue); spriteBatch.Begin(); _currentGameState.Render(spriteBatch); spriteBatch.End(); // Now render the scaled content graphics.GraphicsDevice.SetRenderTarget(null); graphics.GraphicsDevice.Clear(ClearOptions.Target, Color.Black, 1.0f, 0); spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Opaque); spriteBatch.Draw(_renderTarget, _renderScaleRectangle, Color.White); spriteBatch.End(); base.Draw(gameTime); }
protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); _currentGameState.Render(_spriteBatch, WindowContainer); base.Draw(gameTime); }