|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Backend agnostic graphics subsystem for visual processing. More...
#include <GraphicsSubsystem.hpp>
Inheritance diagram for MayaFlux::Core::GraphicsSubsystem:
Collaboration diagram for MayaFlux::Core::GraphicsSubsystem:Public Member Functions | |
| IGraphicsBackend * | get_backend () |
| Get underlying graphics backend for advanced usage Can be cast to VulkanBackend* or OpenGLBackend* for backend-specific operations. | |
| const IGraphicsBackend * | get_backend () const |
| GlobalGraphicsConfig::GraphicsApi | get_backend_type () const |
| Get the type of the graphics backend. | |
| Vruta::FrameClock & | get_frame_clock () |
| Get frame clock. | |
| const Vruta::FrameClock & | get_frame_clock () const |
| std::thread::id | get_graphics_thread_id () const |
| Get graphics thread ID. | |
| double | get_measured_fps () const |
| Get actual measured FPS. | |
| SubsystemProcessingHandle * | get_processing_context_handle () override |
| Get the processing context handle for this subsystem. | |
| uint32_t | get_target_fps () const |
| Get target frame rate. | |
| SubsystemTokens | get_tokens () const override |
| Get the processing token configuration this subsystem manages. | |
| SubsystemType | get_type () const override |
| Get the type of this subsystem. | |
| GraphicsSubsystem (const GlobalGraphicsConfig &graphics_config) | |
| GraphicsSubsystem constructor. | |
| void | initialize (SubsystemProcessingHandle &handle) override |
| Initialize with graphics configuration. | |
| bool | is_graphics_thread () const |
| Check if currently on graphics thread. | |
| bool | is_ready () const override |
| Check if subsystem is ready for operation. | |
| bool | is_running () const override |
| Check if subsystem is currently processing. | |
| void | pause () override |
| Pause the subsystem's processing/event loops. | |
| void | process () |
| Unified processing callback (alternative to separate methods) | |
| void | register_callbacks () override |
| Register callback hooks for this domain. | |
| void | register_windows_for_processing () |
| Register markend windows from window manager for swapchain processing. | |
| void | render_all_windows () |
| Render all registered windows. | |
| void | resume () override |
| Resume the subsystem's processing/event loops. | |
| void | set_target_fps (uint32_t fps) |
| Set target frame rate (can be changed at runtime) | |
| void | shutdown () override |
| Shutdown and cleanup subsystem resources. | |
| void | start () override |
| Start the subsystem's processing/event loops. | |
| void | stop () override |
| Stop the subsystem's processing/event loops. | |
| ~GraphicsSubsystem () override | |
Public Member Functions inherited from MayaFlux::Core::ISubsystem | |
| virtual | ~ISubsystem ()=default |
Private Member Functions | |
| void | cleanup_closed_windows () |
| Cleanup resources for windows that have been closed. | |
| void | graphics_thread_loop () |
| Graphics thread main loop. | |
| void | initialize_graphics_portal () |
| Initialize Portal::Graphics subsystem. | |
| void | process_frame_coroutines_impl (const std::vector< std::shared_ptr< Vruta::Routine > > &tasks, uint64_t processing_units) |
| Process all FRAME_ACCURATE coroutines for given frames. | |
| void | register_frame_processor () |
| Register custom frame processor with scheduler. | |
| void | teardown_windows () |
| Teardown all window resources during shutdown. | |
Private Attributes | |
| std::unique_ptr< IGraphicsBackend > | m_backend |
| std::shared_ptr< Vruta::FrameClock > | m_frame_clock |
| GlobalGraphicsConfig | m_graphics_config |
| Graphics/windowing configuration. | |
| std::thread | m_graphics_thread |
| std::thread::id | m_graphics_thread_id |
| SubsystemProcessingHandle * | m_handle |
| Reference to processing handle. | |
| bool | m_is_ready {} |
| std::atomic< bool > | m_paused { false } |
| std::vector< std::shared_ptr< Window > > | m_registered_windows |
| std::atomic< bool > | m_running { false } |
| SubsystemTokens | m_subsystem_tokens |
| Processing token configuration. | |
Backend agnostic graphics subsystem for visual processing.
Manages graphics thread, backend context, and frame-based processing. Parallel to AudioSubsystem but with self-driven timing model.
Key Architectural Differences from AudioSubsystem:
AudioSubsystem: RTAudio callback → process() → scheduler.tick(samples) Clock is externally driven by audio hardware
GraphicsSubsystem: Graphics thread loop → clock.tick() → process() → scheduler observes Clock is self-driven based on wall-clock time
The FrameClock manages its own timing and the subsystem's process methods are called from the graphics thread loop, not from an external callback.
Definition at line 35 of file GraphicsSubsystem.hpp.