void mainLoop() { FpsCounter fpsCounter = new FpsCounter("mainLoop"); FpsCounter fpsDrawFrame = new FpsCounter("drawFrame", reportCounters: FpsReportCounters.SimpleFrameTime); FpsControl fpsControl = new FpsControl(); GLFW.EventLoop(window, () => { fpsCounter.Begin(); GLFW.glfwPollEvents(); fpsDrawFrame.Begin(); drawFrame(); fpsDrawFrame.End(); fpsCounter.End(); fpsCounter.DebugPeriodicReport(); fpsDrawFrame.DebugPeriodicReport(); fpsControl.Update(); }); Vulkan.vkDeviceWaitIdle(device); }