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

◆ shutdown()

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

Shutdown and cleanup all samplers.

Definition at line 42 of file SamplerForge.cpp.

43{
44 if (!s_initialized) {
45 return;
46 }
47
48 if (!m_backend) {
49 return;
50 }
51
53 "Shutting down SamplerForge...");
54
55 auto device = m_backend->get_context().get_device();
56 for (auto& [hash, sampler] : m_sampler_cache) {
57 if (sampler) {
58 device.destroySampler(sampler);
59 }
60 }
61 m_sampler_cache.clear();
62
63 m_backend = nullptr;
64
65 s_initialized = false;
66
68 "SamplerForge shutdown complete");
69}
#define MF_INFO(comp, ctx,...)
std::unordered_map< size_t, vk::Sampler > m_sampler_cache
std::shared_ptr< Core::VulkanBackend > m_backend
@ ImageProcessing
Image processing tasks (filters, transformations)
@ Portal
High-level user-facing API layer.

References MayaFlux::Journal::ImageProcessing, m_backend, m_sampler_cache, MF_INFO, MayaFlux::Journal::Portal, and s_initialized.

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

+ Here is the caller graph for this function: