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

◆ shutdown()

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

Shutdown and cleanup all textures.

Destroys all managed textures and samplers. Safe to call multiple times.

Definition at line 48 of file TextureLoom.cpp.

49{
50 if (!s_initialized) {
51 return;
52 }
53
54 if (!m_backend) {
55 return;
56 }
57
59 "Shutting down TextureLoom...");
60
61 for (auto& texture : m_textures) {
62 if (texture && texture->is_initialized()) {
64 }
65 }
66 m_textures.clear();
67 m_sampler_cache.clear();
68 m_resource_manager = nullptr;
69 m_backend = nullptr;
70
71 s_initialized = false;
72
74 "TextureLoom shutdown complete");
75}
#define MF_INFO(comp, ctx,...)
void cleanup_image(const std::shared_ptr< VKImage > &image)
Cleanup a VKImage (destroy view, image, and free memory)
std::shared_ptr< Core::VulkanBackend > m_backend
Core::BackendResourceManager * m_resource_manager
std::vector< std::shared_ptr< Core::VKImage > > m_textures
std::unordered_map< size_t, vk::Sampler > m_sampler_cache
@ ImageProcessing
Image processing tasks (filters, transformations)
@ Portal
High-level user-facing API layer.

References MayaFlux::Core::BackendResourceManager::cleanup_image(), MayaFlux::Journal::ImageProcessing, m_backend, m_resource_manager, m_sampler_cache, m_textures, MF_INFO, MayaFlux::Journal::Portal, 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: