private void Run() { while (!m_bShutdown) { m_dispatcherQueue.Execute((int)EEngineUpdatePriority.BeginFrame); float deltaTime = Updater.UpdateDeltaTime(); // Update Input first poll input is thread safe but we should normally only poll here Input.PollInput(); if (EnableEngineUpdate > 0) { CRenderer.Instance.BeginFrame(deltaTime); Config.Update(deltaTime); CurrentWorld?.Update(deltaTime); CRenderer.Instance.RenderFrame(deltaTime); } m_dispatcherQueue.Execute((int)EEngineUpdatePriority.EndFrame); } CurrentWorld?.Shutdown(); CRenderer.Instance.Dispose(); Input.Shutdown(); CAssetRegistry.Instance.Dispose(); }