Graphics thread main loop.
Self-driven frame processing:
- Tick frame clock (advances based on wall-clock time)
- Process visual nodes (VISUAL_RATE nodes)
- Process graphics buffers (GRAPHICS_BACKEND buffers)
- Tick scheduler coroutines (FRAME_ACCURATE tasks)
- Record/submit Vulkan commands or OpenGL draw calls
- Wait for next frame (vsync timing)
Definition at line 356 of file GraphicsSubsystem.cpp.
357{
358 while (
m_running.load(std::memory_order_acquire)) {
359 if (
m_paused.load(std::memory_order_acquire)) {
360 std::this_thread::sleep_for(std::chrono::milliseconds(16));
361 continue;
362 }
363
365
367
369
372 if (lag > 2) {
374 "Frame lag detected: {} frames behind (Measured FPS: {:.1f})",
376 }
377 }
378 }
379}
#define MF_RT_WARN(comp, ctx,...)
std::atomic< bool > m_running
std::atomic< bool > m_paused
std::shared_ptr< Vruta::FrameClock > m_frame_clock
void process()
Unified processing callback (alternative to separate methods)
@ GraphicsSubsystem
Graphics subsystem operations (Vulkan, rendering pipeline)
@ Core
Core engine, backend, subsystems.
References MayaFlux::Journal::Core, MayaFlux::Journal::GraphicsSubsystem, m_frame_clock, m_paused, m_running, MF_RT_WARN, and process().
Referenced by start().