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 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); }
private static void LoadEmbeddedFiles() { ManifestReader.RegisterAssembly(Assembly.GetExecutingAssembly()); ManifestReader.RegisterAssembly(typeof(OpenFLBenchmarks).Assembly); ManifestReader.RegisterAssembly(typeof(KernelFLInstruction).Assembly); ManifestReader.PrepareManifestFiles(false); EmbeddedFileIOManager.Initialize(); }
private static void InitializeResourceSystem() { TypeAccumulator.RegisterAssembly(typeof(OpenFLDebugConfig).Assembly); ManifestReader.RegisterAssembly(Assembly.GetExecutingAssembly()); ManifestReader.RegisterAssembly(typeof(FLRunner).Assembly); ManifestReader.PrepareManifestFiles(false); ManifestReader.PrepareManifestFiles(true); EmbeddedFileIOManager.Initialize(); }
public EngineSceneRunCommand() : base(new[] { "--engine", "-e" }, "Start Engine Test Shell.") { CommandAction = (info, strings) => EngineTest(strings); 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. ge = new GameEngine(EngineSettings.DefaultSettings); }
public static void InitializeTestRun(string performanceFolder) { ManifestReader.RegisterAssembly(Assembly.GetExecutingAssembly()); ManifestReader.RegisterAssembly(Assembly.GetAssembly(typeof(KernelFLInstruction))); //Load the Embedded files from OpenFL.Common(the built in kernels) EmbeddedFileIOManager.Initialize(); ManifestReader.PrepareManifestFiles(false); string p = Path.Combine(performanceFolder, "runs.txt"); if (!File.Exists(p)) { Directory.CreateDirectory(performanceFolder); File.WriteAllText(p, "0"); return; } string runs = File.ReadAllText(p); BenchmarkHelper.RunNumber = int.Parse(runs); }
public override bool Run(string[] args) { EmbeddedFileIOManager.Initialize(); ManifestReader.RegisterAssembly(typeof(FLScriptGenerator).Assembly); ManifestReader.PrepareManifestFiles(false); Runner.AddCommand(new HelpCommand(new DefaultHelpCommand(true))); Runner.AddCommand(SetSettingsCommand.CreateSettingsCommand("Settings", Settings)); Runner.RunCommands(args); if (!DoExecute) { return(true); } Debug.DefaultInitialization(); ManifestReader.RegisterAssembly(Assembly.GetExecutingAssembly()); ManifestReader.PrepareManifestFiles(false); ExtPPDebugConfig.Settings.MinSeverity = Verbosity.Silent; OpenFLDebugConfig.Settings.MinSeverity = Verbosity.Level1; OpenCLDebugConfig.Settings.MinSeverity = Verbosity.Silent; Directory.CreateDirectory(Settings.OutputFolder); Random rnd = new Random(); for (int i = 0; i < Settings.Amount; i++) { string file = Path.Combine(Settings.OutputFolder, "genscript." + i + ".fl"); Logger.Log(LogType.Log, "Generating Script...", 1); string script = FLScriptGenerator.GenerateRandomScript( rnd.Next(Settings.Functions.Min, Settings.Functions.Max), rnd.Next(Settings.Buffers.Min, Settings.Buffers.Max), rnd.Next(Settings.Additional.Min, Settings.Additional.Max), rnd.Next(Settings.AdditionalFunctions.Min, Settings.AdditionalFunctions.Max)); Logger.Log(LogType.Log, "Finished Script. Lines: " + script.Count(x => x == '\n'), 1); File.WriteAllText(file, script); } return(true); }
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. ge = new GameEngine(EngineSettings.DefaultSettings); Logger.Log(LogType.Log, "\"exit\" closes the Console.", 1); Logger.Log(LogType.Log, "\"nameofdemo\" Opens the selected Demo.", 1); ListSceneNames(); if (args.Length != 0) { RunCommand(args); } while (true) { Console.Write("engine/demos>"); string format = Console.ReadLine(); if (format == "exit") { break; } string[] arg = format.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); RunCommand(arg); } return(true); }
public void Setup() { ManifestReader.RegisterAssembly(typeof(OpenCLKernelCollectionPlugin).Assembly); EmbeddedFileIOManager.Initialize(); }