Trying to fix invalid descriptorlayout

This commit is contained in:
Dynamitos
2020-10-03 11:00:10 +02:00
parent 79388bf41a
commit ceee96b462
69 changed files with 1087 additions and 393 deletions
@@ -162,6 +162,16 @@ TextureHandle::~TextureHandle()
deletionQueue.addPendingDelete(cmdBuffer, [device, img]() { vkDestroyImage(device, img, nullptr); });
}
TextureHandle* TextureBase::cast(Gfx::PTexture texture)
{
if(texture->getTexture2D() != nullptr)
{
PTexture2D texture2D = texture.cast<Texture2D>();
return texture2D->textureHandle;
}
return nullptr;
}
void TextureHandle::changeLayout(VkImageLayout newLayout)
{
VkImageMemoryBarrier barrier =