MayaFlux 0.1.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 41 of file TextureLoom.cpp.

42{
43 if (!s_initialized) {
44 return;
45 }
46
47 if (!m_backend) {
48 return;
49 }
50
52 "Shutting down TextureLoom...");
53
54 for (auto& texture : m_textures) {
55 if (texture && texture->is_initialized()) {
57 }
58 }
59 m_textures.clear();
60 m_sampler_cache.clear();
61 m_resource_manager = nullptr;
62 m_backend = nullptr;
63
64 s_initialized = false;
65
67 "TextureLoom shutdown complete");
68}
#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: