imagevulkan destroy
This commit is contained in:
parent
bd1a6313dd
commit
1bc6293610
1 changed files with 6 additions and 0 deletions
|
|
@ -148,6 +148,12 @@ export namespace Crafter {
|
|||
TransitionImageLayout(cmd, image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, 0, mipLevels);
|
||||
}
|
||||
|
||||
void Destroy() {
|
||||
vkDestroyImageView(Device::device, imageView, nullptr);
|
||||
vkDestroyImage(Device::device, image, nullptr);
|
||||
vkFreeMemory(Device::device, imageMemory, nullptr);
|
||||
}
|
||||
|
||||
private:
|
||||
void TransitionImageLayout(VkCommandBuffer cmd, VkImage image, VkImageLayout oldLayout, VkImageLayout newLayout, std::uint32_t mipLevel, std::uint32_t count) {
|
||||
VkImageMemoryBarrier barrier = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue