MayaFlux 0.4.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 506 of file BackendResoureManager.cpp.

507{
508 if (!image || !image->is_initialized()) {
509 return;
510 }
511
512 const auto& resources = image->get_image_resources();
513
514 if (resources.image_view) {
515 m_context.get_device().destroyImageView(resources.image_view);
516 }
517
518 if (resources.image) {
519 m_context.get_device().destroyImage(resources.image);
520 }
521
522 if (resources.memory) {
523 m_context.get_device().freeMemory(resources.memory);
524 }
525
527 "VKImage cleaned up");
528}
#define MF_DEBUG(comp, ctx,...)
IO::ImageData image
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, image, 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: