Ejemplo n.º 1
0
        private void StartupModuleToPhase(LoadedModule module, StartupPhase phase)
        {
            if (MostRecentStartup <= module.CurrentPhase)
            {
                return;
            }

            module.Module.StartupModule(phase);
            module.CurrentPhase = phase;
        }
Ejemplo n.º 2
0
 public override void StartupModule(StartupPhase Phase)
 {
     if (Phase == StartupPhase.PreEngineInit)
     {
         //Hack taken from the maintainer of this library
         //TODO: Determine the path for non win-64 builds
         new NativeLibrary(Path.Combine(Path.GetDirectoryName(ModulePath), "runtimes", "win-x64", "native", "SDL2.dll"));
         new NativeLibrary(Path.Combine(Path.GetDirectoryName(ModulePath), "runtimes", "win-x64", "native", "libveldrid-spirv.dll"));
     }
 }
Ejemplo n.º 3
0
        public override void StartupModule(StartupPhase Phase)
        {
            if (Phase == StartupPhase.EngineInit)
            {
                Renderable = new IMGUIRenderable();
                Renderable.Initialize(IEngine.Instance);
            }

            if (Phase == StartupPhase.PostRendererInit)
            {
                Renderable.PostRenderInitialize(IEngine.Instance.Renderer);
            }
        }
Ejemplo n.º 4
0
 public override void StartupModule(StartupPhase Phase)
 {
     if (Phase == StartupPhase.PreEngineInit)
     {
         IEngine.Instance.BindLogOutput(Console.RecieveLogMessage);
         IEngine.Instance.GameThreadTickManager.AddTick(new Tickable.TickFunction
         {
             CanTick      = true,
             TickPriority = ImGUIModule.ImGUI_FrameStartTick - 1,
             TickFunc     = Console.Tick
         });
     }
 }
Ejemplo n.º 5
0
        public void EnterPhase(StartupPhase Phase)
        {
            if (MostRecentStartup >= Phase)
            {
                return;
            }
            Logger.Info("Entering Module Startup Phase {0}", Phase.ToString());
            MostRecentStartup = Phase;

            foreach (LoadedModule loadedModule in Modules)
            {
                StartupModuleToPhase(loadedModule, Phase);
            }
        }
Ejemplo n.º 6
0
 public override void StartupModule(StartupPhase Phase)
 {
     /*
      * if(Phase == StartupPhase.EngineInit)
      * {
      *  RenderObject = new FlowRenderable();
      *  StartFrameTickFunc.TickFunc = RenderObject.Tick;
      *
      *  IEngine.Instance.GameThreadTickManager.AddTick(StartFrameTickFunc);
      * }
      * if(Phase == StartupPhase.PostRendererInit)
      * {
      *
      *  RenderObject.PostRendererInit(IEngine.Instance.Renderer);
      * }
      */
 }
 public override void StartupModule(StartupPhase Phase)
 {
 }
Ejemplo n.º 8
0
 public abstract void StartupModule(StartupPhase Phase);