Example #1
0
        public void Run()
        {
            Logger.Info("Welcome to the Fury Engine!");
            Logger.Info("Platform: " + RuntimeInformation.OSDescription);

            ImGuiController.Init(window);

            while (running)
            {
                double time    = GLFW.GetTime();
                float  elapsed = (float)(time - lastFrameTime);
                Time.deltaTime = elapsed;
                lastFrameTime  = time;

                if (!window.Minimised)
                {
                    foreach (Layer layer in layerStack.Layers)
                    {
                        layer.OnUpdate();
                    }

                    ImGuiController.Begin(window);
                    foreach (Layer layer in layerStack.Layers)
                    {
                        layer.OnImGuiRender();
                    }
                    ImGuiController.End();
                }

                window.OnUpdate();
            }
        }