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

◆ cleanup_image()

void MayaFlux::Core::BackendResourceManager::cleanup_image ( const std::shared_ptr< VKImage > &  image)

Cleanup a VKImage (destroy view, image, and free memory)

Parameters
imageVKImage to cleanup

Definition at line 408 of file BackendResoureManager.cpp.

409{
410 if (!image || !image->is_initialized()) {
411 return;
412 }
413
414 const auto& resources = image->get_image_resources();
415
416 if (resources.image_view) {
417 m_context.get_device().destroyImageView(resources.image_view);
418 }
419
420 if (resources.image) {
421 m_context.get_device().destroyImage(resources.image);
422 }
423
424 if (resources.memory) {
425 m_context.get_device().freeMemory(resources.memory);
426 }
427
429 "VKImage cleaned up");
430}
#define MF_DEBUG(comp, ctx,...)
vk::Device get_device() const
Get logical device.
Definition VKContext.hpp:49
@ GraphicsBackend
Graphics/visual rendering backend (Vulkan, OpenGL)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, MayaFlux::Core::VKContext::get_device(), MayaFlux::Journal::GraphicsBackend, m_context, and MF_DEBUG.

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

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