MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ shutdown()

void MayaFlux::Portal::Graphics::RenderFlow::shutdown ( )

Definition at line 86 of file RenderFlow.cpp.

87{
88 if (!s_initialized) {
89 return;
90 }
91
93 "Shutting down RenderFlow...");
94
97 "Cannot shutdown RenderFlow: ShaderFoundry not initialized");
98 return;
99 }
100
101 auto device = m_shader_foundry->get_device();
102
103 if (!device) {
105 "Cannot shutdown RenderFlow: Vulkan device is null");
106 return;
107 }
108
109 for (auto& [id, state] : m_pipelines) {
110 if (state.pipeline) {
111 state.pipeline->cleanup(device);
112 }
113
114 if (state.layout) {
115 device.destroyPipelineLayout(state.layout);
116 }
117 }
118 m_pipelines.clear();
119
120 for (auto& [id, state] : m_render_passes) {
121 if (state.render_pass) {
122 state.render_pass->cleanup(device);
123 }
124 }
125 m_render_passes.clear();
126
127 m_window_associations.clear();
128
129 m_shader_foundry = nullptr;
130 m_display_service = nullptr;
131
132 s_initialized = false;
133
135 "RenderFlow shutdown complete");
136}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)
std::unordered_map< RenderPassID, RenderPassState > m_render_passes
std::unordered_map< std::shared_ptr< Core::Window >, WindowRenderAssociation > m_window_associations
std::unordered_map< RenderPipelineID, PipelineState > m_pipelines
Registry::Service::DisplayService * m_display_service
bool is_initialized() const
Check if compiler is initialized.
@ Rendering
GPU rendering operations (graphics pipeline, frame rendering)
@ Portal
High-level user-facing API layer.

References MayaFlux::Portal::Graphics::ShaderFoundry::get_device(), MayaFlux::Portal::Graphics::ShaderFoundry::is_initialized(), m_display_service, m_pipelines, m_render_passes, m_shader_foundry, m_window_associations, MF_ERROR, MF_INFO, MayaFlux::Journal::Portal, MayaFlux::Journal::Rendering, and s_initialized.

Referenced by MayaFlux::Portal::Graphics::shutdown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: