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 346 of file GraphicsSubsystem.cpp.
347{
348 while (
m_running.load(std::memory_order_acquire)) {
349 if (
m_paused.load(std::memory_order_acquire)) {
350 std::this_thread::sleep_for(std::chrono::milliseconds(16));
351 continue;
352 }
353
355
357
359
362 if (lag > 2) {
364 "Frame lag detected: {} frames behind (Measured FPS: {:.1f})",
366 }
367 }
368 }
369}
#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().