/// <summary> /// Loop through all the tests and save the images. /// </summary> /// <param name="gameTime">the game time.</param> protected override void Draw(GameTime gameTime) { GraphicsContext.CommandList.BeginProfile(Color.Orange, $"Frame #{gameTime.FrameCount}"); try { base.Draw(gameTime); } finally { GraphicsContext.CommandList.EndProfile(); } if (!ScreenShotAutomationEnabled) { return; } string testName; if (FrameGameSystem.AllTestsCompleted) { Exit(); } else if (FrameGameSystem.IsScreenshotNeeded(out testName)) { SaveBackBuffer(testName); } }
/// <summary> /// Loop through all the tests and save the images. /// </summary> /// <param name="gameTime">the game time.</param> protected override void Draw(GameTime gameTime) { base.Draw(gameTime); if (!ScreenShotAutomationEnabled) { return; } string testName; if (FrameGameSystem.AllTestsCompleted) { Exit(); } else if (FrameGameSystem.IsScreenshotNeeded(out testName)) { SaveBackBuffer(testName); } }