private static void InitMainGraphicsContext() { if (mainGraphicsContext != null) { return; } if (graphicsBack == null) { DualityApp.InitBackend(out graphicsBack, GetAvailDualityEditorTypes); } try { // Currently bound to game-specific settings. Should be decoupled // from them at some point, so the editor can use independent settings. mainGraphicsContext = graphicsBack.CreateContext(AAQuality.Off); } catch (Exception e) { mainGraphicsContext = null; Console.WriteLine("Can't create editor graphics context, because an error occurred: {0}", /*LogFormat.Exception(*/ e /*)*/); } }
private static void Initialize() { DualityApp.InitBackend(out prefBack); DualityApp.Terminating += OnDualityAppTerminating; }