Adding delayed destruction for resources

This commit is contained in:
2023-11-12 16:11:27 +01:00
parent c1e4891456
commit b3c9af384b
10 changed files with 92 additions and 23 deletions
+2 -7
View File
@@ -159,13 +159,8 @@ TextureHandle::TextureHandle(PGraphics graphics, VkImageViewType viewType,
TextureHandle::~TextureHandle()
{
//auto cmdBuffer = graphics->getQueueCommands(currentOwner)->getCommands();
//VkDevice device = graphics->getDevice();
//VkImageView view = defaultView;
//VkImage img = image;
//vkDestroyImageView(device, view, nullptr);
//vkDestroyImage(device, img, nullptr);
//co_return;
graphics->getDestructionManager()->queueImage(graphics->getQueueCommands(currentOwner)->getCommands(), image);
graphics->getDestructionManager()->queueImageView(graphics->getQueueCommands(currentOwner)->getCommands(), defaultView);
}
TextureHandle* TextureBase::cast(Gfx::PTexture texture)