39 if (!
m_context->initialize(config,
true)) {
41 "Failed to initialize Vulkan context!");
47 m_context->get_queue_families().graphics_family.value())) {
50 "Failed to initialize command manager!");
64 auto buffer_service = std::make_shared<Registry::Service::BufferService>();
68 return buffer_service.get();
71 auto compute_service = std::make_shared<Registry::Service::ComputeService>();
75 return compute_service.get();
78 auto display_service = std::make_shared<Registry::Service::DisplayService>();
82 return display_service.get();
#define MF_RT_ERROR(comp, ctx,...)
Manages Vulkan pipelines (compute, graphics) and related resources.
Manages Vulkan resources (buffers, images, samplers) for the graphics backend.
Manages Vulkan command pools and command buffers.
High-level wrapper for Vulkan instance and device.
std::shared_ptr< Registry::Service::ComputeService > m_compute_service
bool is_window_registered(std::shared_ptr< Window > window) override
Check if a window is registered with the graphics backend.
void wait_idle() override
Wait until the graphics backend is idle.
~VulkanBackend() override
void * get_native_context() override
Get context pointer specific to the graphics backend (e.g., OpenGL context, Vulkan instance,...
void register_backend_services()
void render_all_windows() override
Render all registered windows (batch optimization) Default: calls render_window() for each registered...
std::shared_ptr< Registry::Service::BufferService > m_buffer_service
bool initialize(const GlobalGraphicsConfig &config) override
Initialize the graphics backend with global configuration.
void render_window(std::shared_ptr< Window > window) override
Render the contents of the specified window.
bool register_window(std::shared_ptr< Window > window) override
Register a window with the graphics backend for rendering.
std::unique_ptr< BackendWindowHandler > m_window_handler
std::unique_ptr< VKContext > m_context
std::shared_ptr< Registry::Service::DisplayService > m_display_service
void cleanup() override
Cleanup the graphics backend and release all resources.
std::unique_ptr< BackendPipelineManager > m_pipeline_manager
void handle_window_resize() override
Handle window resize event for the specified window.
void unregister_window(std::shared_ptr< Window > window) override
Unregister a window from the graphics backend.
std::unique_ptr< VKCommandManager > m_command_manager
std::unique_ptr< BackendResourceManager > m_resource_manager
static BackendRegistry & instance()
Get the global registry instance.
@ GraphicsBackend
Graphics/visual rendering backend (Vulkan, OpenGL)
@ Core
Core engine, backend, subsystems.
Backend buffer management service interface.
Backend compute shader and pipeline service interface.
std::function< void()> wait_idle
Wait for all GPU operations to complete.
Backend display and presentation service interface.