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

@@ -39,11 +39,11 @@ namespace OpenVulkano::Vulkan
{
if (Texture* texture = material->texture)
{
VulkanTexture* renderTexture = static_cast<VulkanTexture*>(texture->renderTexture);
VulkanTexture* renderTexture = texture->GetRenderResource();
if (!renderTexture)
{
drawContext->renderer->GetResourceManager().PrepareMaterial(drawable->GetMaterial());
renderTexture = static_cast<VulkanTexture*>(texture->renderTexture);
renderTexture = texture->GetRenderResource();
}
renderTexture->Record(drawContext);
}