public override bool Run(string[] args) { ADL.Debug.DefaultInitialization(); EmbeddedFileIOManager.Initialize(); ManifestReader.RegisterAssembly(Assembly .GetExecutingAssembly()); //Register this assembly(where the files will be embedded in) ManifestReader.PrepareManifestFiles(false); //First Read Assembly files ManifestReader .PrepareManifestFiles(true); //Replace Any Loaded assembly files with files on the file system. if (IOManager.FileExists("assemblyList.txt")) //Alternative, load assembly list to register from text file. { Logger.Log(DebugChannel.Log, "Loading Assembly List", 1); ManifestReader.LoadAssemblyListFromFile("assemblyList.txt"); } GameEngine engine = new GameEngine(EngineSettings.DefaultSettings); engine.Initialize(); engine.InitializeScene <PhysicsDemoScene>(); engine.Run(); engine.Dispose(); HandleBase.DisposeAllHandles(); EngineStatisticsManager.DisposeAllHandles(); return(true); }
public override bool Run(string[] args) { Byt3.ADL.Debug.DefaultInitialization(); EmbeddedFileIOManager.Initialize(); OpenFLDebugConfig.Settings.MinSeverity = Verbosity.Level3; ManifestReader.RegisterAssembly(Assembly .GetExecutingAssembly()); //Register this assembly(where the files will be embedded in) ManifestReader.RegisterAssembly(typeof(OpenFLDebugConfig).Assembly); //Register the OpenFL.Common Assembly as it contains the CL kernels ManifestReader.PrepareManifestFiles(false); //First Read Assembly files ManifestReader .PrepareManifestFiles(true); //Replace Any Loaded assembly files with files on the file system. if (IOManager.FileExists("assemblyList.txt")) //Alternative, load assembly list to register from text file. { Logger.Log(DebugChannel.Log, "Loading Assembly List", 1); ManifestReader.LoadAssemblyListFromFile("assemblyList.txt"); } GameEngine engine = new GameEngine(EngineSettings.DefaultSettings); engine.Initialize(); engine.InitializeScene <HoBMenuScene>(); engine.Run(); engine.Dispose(); HandleBase.DisposeAllHandles(); EngineStatisticsManager.DisposeAllHandles(); return(true); }
public override void Dispose() { base.Dispose(); if (!IsCopy) { EngineStatisticsManager.GlObjectDestroyed(this); } }
protected DisposableGLObjectBase(bool isCopy, object handleIdentifier) : base(handleIdentifier) { IsCopy = isCopy; if (!isCopy) { EngineStatisticsManager.GlObjectCreated(this); } }
private void StartScene(Type t) { ge.Initialize(); ge.InitializeScene(t); ge.Run(); //Clean up our mess EngineStatisticsManager.DisposeAllHandles(); //Dispose GL Handles HandleBase.DisposeAllHandles(); //Dispose CL Handles }
private void StartScene(Type t) { ge.Initialize(); ge.InitializeScene(t); if (AttachTimeout) { ge.SetDebugComponents(new AbstractComponent[] { new TimeoutComponent(TimeoutTime), }); } ge.Run(); if (!Directory.Exists("./logs")) { Directory.CreateDirectory("./logs"); } EngineStatisticsManager.WriteStatistics("./logs/" + t.Name + ".statistics.log"); EngineStatisticsManager.DisposeAllHandles(); HandleBase.DisposeAllHandles(); }