protected GameTestBase() { // Override the default graphic device manager GraphicsDeviceManager.Dispose(); GraphicsDeviceManager = new TestGraphicsDeviceManager(this) { PreferredBackBufferWidth = 800, PreferredBackBufferHeight = 480, PreferredDepthStencilFormat = PixelFormat.D24_UNorm_S8_UInt, DeviceCreationFlags = DeviceCreationFlags.Debug, PreferredGraphicsProfile = new[] { GraphicsProfile.Level_9_1 } }; Services.AddService(typeof(IGraphicsDeviceManager), GraphicsDeviceManager); Services.AddService(typeof(IGraphicsDeviceService), GraphicsDeviceManager); // Enable profiling //Profiler.EnableAll(); CurrentVersion = 0; StopOnFrameCount = -1; AutoLoadDefaultSettings = false; FrameGameSystem = new FrameGameSystem(Services); GameSystems.Add(FrameGameSystem); // by default we want the same size for the back buffer on mobiles and windows. BackBufferSizeMode = BackBufferSizeMode.FitToDesiredValues; #if SILICONSTUDIO_PLATFORM_WINDOWS_DESKTOP // get build number int buildNumber; if (ImageTester.ImageTestResultConnection.BuildNumber <= 0 && int.TryParse(Environment.GetEnvironmentVariable("XENKO_BUILD_NUMBER"), out buildNumber)) { ImageTester.ImageTestResultConnection.BuildNumber = buildNumber; } // get branch name if (string.IsNullOrEmpty(ImageTester.ImageTestResultConnection.BranchName)) { ImageTester.ImageTestResultConnection.BranchName = Environment.GetEnvironmentVariable("XENKO_BRANCH_NAME") ?? ""; } #endif SceneSystem.SplashScreenEnabled = false; }
/// <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); } }
public GraphicsTestBase() { isServer = false; saveLocally = false; BaseVersionNumber = 0; CurrentVersionNumber = 0; Timeout = 120000; server = null; client = null; serverUp = false; runTests = false; isClientConnected = false; onBamboo = Environment.GetEnvironmentVariable("XENKO_BAMBOO_TEST") != null; if (!Int32.TryParse(Environment.GetEnvironmentVariable(@"BAMBOO_BUILD_NUMBER"), out buildNumber)) { buildNumber = 0; } xenkoSdkDir = Environment.GetEnvironmentVariable(@"XenkoSdkDir"); if (onBamboo) { branchName = Environment.GetEnvironmentVariable("XENKO_BAMBOO_BRANCH_NAME"); if (branchName != null) { branchName = branchName.Trim(); } } else { branchName = null; } assemblyNameForAndroid = this.GetType().Assembly.ManifestModule.ScopeName; FrameGameSystem = new FrameGameSystem(this.Services); FrameGameSystem.Visible = true; FrameGameSystem.Enabled = true; this.GameSystems.Add(FrameGameSystem); }
protected GameTestBase() { // Override the default graphic device manager GraphicsDeviceManager.Dispose(); GraphicsDeviceManager = new TestGraphicsDeviceManager(this) { PreferredBackBufferWidth = 800, PreferredBackBufferHeight = 480, PreferredDepthStencilFormat = PixelFormat.D24_UNorm_S8_UInt, DeviceCreationFlags = DeviceCreationFlags.Debug, PreferredGraphicsProfile = new[] { GraphicsProfile.Level_9_1 } }; // Enable profiling //Profiler.EnableAll(); CurrentVersion = 0; StopOnFrameCount = -1; AutoLoadDefaultSettings = false; FrameGameSystem = new FrameGameSystem(Services); GameSystems.Add(FrameGameSystem); // by default we want the same size for the back buffer on mobiles and windows. BackBufferSizeMode = BackBufferSizeMode.FitToDesiredValues; #if SILICONSTUDIO_PLATFORM_WINDOWS_DESKTOP // get build number int buildNumber; if (ImageTester.ImageTestResultConnection.BuildNumber <= 0 && int.TryParse(Environment.GetEnvironmentVariable("XENKO_BUILD_NUMBER"), out buildNumber)) ImageTester.ImageTestResultConnection.BuildNumber = buildNumber; // get branch name if (string.IsNullOrEmpty(ImageTester.ImageTestResultConnection.BranchName)) ImageTester.ImageTestResultConnection.BranchName = Environment.GetEnvironmentVariable("XENKO_BRANCH_NAME") ?? ""; #endif }
public GraphicsTestBase() { isServer = false; saveLocally = false; BaseVersionNumber = 0; CurrentVersionNumber = 0; Timeout = 120000; server = null; client = null; serverUp = false; runTests = false; isClientConnected = false; onBamboo = Environment.GetEnvironmentVariable("XENKO_BAMBOO_TEST") != null; if (!Int32.TryParse(Environment.GetEnvironmentVariable(@"BAMBOO_BUILD_NUMBER"), out buildNumber)) buildNumber = 0; xenkoSdkDir = Environment.GetEnvironmentVariable(@"XenkoSdkDir"); if (onBamboo) { branchName = Environment.GetEnvironmentVariable("XENKO_BAMBOO_BRANCH_NAME"); if (branchName != null) branchName = branchName.Trim(); } else branchName = null; assemblyNameForAndroid = this.GetType().Assembly.ManifestModule.ScopeName; FrameGameSystem = new FrameGameSystem(this.Services); FrameGameSystem.Visible = true; FrameGameSystem.Enabled = true; this.GameSystems.Add(FrameGameSystem); }