From 057292c138fee6ca6f7e74afd262307b95d8b8dd Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Thu, 19 Nov 2020 17:54:45 -0500 Subject: [PATCH] separate letterboxColor from backgroundColor. --- Shared/ShmupScene.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shared/ShmupScene.cs b/Shared/ShmupScene.cs index 927bdcb..8140af4 100644 --- a/Shared/ShmupScene.cs +++ b/Shared/ShmupScene.cs @@ -8,7 +8,8 @@ namespace SemiColinGames { const float DESIRED_ASPECT_RATIO = 1920.0f / 1080.0f; - private readonly Color backgroundColor = Color.DarkBlue; + private readonly Color letterboxColor = Color.DarkSlateBlue; + private readonly Color backgroundColor = Color.Black; private readonly GraphicsDevice graphics; private readonly RenderTarget2D sceneTarget; @@ -35,8 +36,6 @@ namespace SemiColinGames { public void Draw(bool isRunningSlowly, IWorld iworld, bool paused) { ShmupWorld world = (ShmupWorld) iworld; - graphics.SetRenderTarget(null); - graphics.Clear(Color.Black); // Draw scene to sceneTarget. graphics.SetRenderTarget(sceneTarget); @@ -64,6 +63,7 @@ namespace SemiColinGames { // Get ready to draw sceneTarget to screen. graphics.SetRenderTarget(null); + graphics.Clear(letterboxColor); // Letterbox the scene if needed. float aspectRatio = 1.0f * graphics.Viewport.Width / graphics.Viewport.Height;