Handle texture data format

This commit is contained in:
Georg Hagen
2024-07-07 00:23:26 +02:00
parent fcecdd63a3
commit add09b59af
3 changed files with 5 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ namespace OpenVulkano::Vulkan
virtual void Init(ResourceManager* resManager, Scene::Texture* texture, vk::DescriptorSetLayout* descriptorSetLayout, const DescriptorSetLayoutBinding& binding)
{
m_texture = texture;
Image::Init(resManager->GetContext()->device.get(), { texture->resolution.x, texture->resolution.y, texture->resolution.z });
Image::Init(resManager->GetContext()->device.get(), texture->format, { texture->resolution.x, texture->resolution.y, texture->resolution.z });
resManager->CopyDataToImage(m_texture->size, m_texture->textureBuffer, this);
texture->updated = false;