public void PerformRenderPipelineTest() { // We must change directory to the location of the assembly, because // Linux doesn't load SDL DLLs properly. Environment.CurrentDirectory = new FileInfo(Assembly.GetEntryAssembly().Location).DirectoryName; var kernel = new StandardKernel(); kernel.Load <ProtogameCoreModule>(); kernel.Load <ProtogameAssetModule>(); kernel.Bind <IAssert>().ToMethod(x => _assert); kernel.Bind <ITestAttachment>().ToMethod(x => _testAttachment); kernel.Bind <IRawLaunchArguments>().ToMethod(x => new DefaultRawLaunchArguments(new string[0])); try { using (var game = new HostGame(new RenderPipelineGame(kernel))) { game.Run(); } } catch (Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException) { System.Console.Error.WriteLine("WARNING: Unable to perform render pipeline tests as no graphics device could be found!"); } }
protected override async void OnCreate(Bundle bundle) { base.OnCreate(bundle); HideSystemUi(); _hostGame = new HostGame(this); var view = (View)_hostGame.Services.GetService(typeof(View)); SetContentView(view); _hostGame.Run(); }