Render resource handling for textures

This commit is contained in:
Georg Hagen
2024-08-21 13:13:43 +02:00
parent 33c8b74342
commit 3940a72084
7 changed files with 57 additions and 47 deletions

View File

@@ -19,7 +19,7 @@ namespace OpenVulkano::Vulkan
ArBackgroundDrawable* bgDrawable = static_cast<ArBackgroundDrawable*>(instance);
bgDrawable->Tick();
const Texture* texture = bgDrawable->GetTexture();
VulkanTexture* vkTexture = static_cast<VulkanTexture*>(texture->renderTexture);
VulkanTexture* vkTexture = texture->GetRenderResource();
if (!vkTexture)
{
vkTexture = drawContext->renderer->GetResourceManager().PrepareTexture(const_cast<Texture*>(texture));