From 0d819f2b9a71e862bce8799c6b0c1304e62219b3 Mon Sep 17 00:00:00 2001 From: hachem Date: Fri, 22 Aug 2025 12:24:05 +0200 Subject: [add]: add HDRI --- src/Platform/Vulkan/VulkanTexture.cpp | 49 ++++++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 6 deletions(-) (limited to 'src/Platform/Vulkan/VulkanTexture.cpp') diff --git a/src/Platform/Vulkan/VulkanTexture.cpp b/src/Platform/Vulkan/VulkanTexture.cpp index 623e540..4145130 100644 --- a/src/Platform/Vulkan/VulkanTexture.cpp +++ b/src/Platform/Vulkan/VulkanTexture.cpp @@ -5,32 +5,69 @@ namespace Donut VulkanTexture2D::VulkanTexture2D(uint32_t width, uint32_t height) : m_Width(width), m_Height(height) { - // TODO(Hachem): Implement Vulkan texture creation with dimensions + m_InternalFormat = 0; + m_DataFormat = 0; + m_RendererID = 0; } VulkanTexture2D::VulkanTexture2D(const std::string& path) : m_Path(path) { - // TODO(Hachem): Implement Vulkan texture creation from file + m_Width = 1; + m_Height = 1; + m_InternalFormat = 0; + m_DataFormat = 0; + m_RendererID = 0; } VulkanTexture2D::~VulkanTexture2D() { - // TODO(Hachem): Implement Vulkan texture cleanup } void VulkanTexture2D::SetData(void* data, uint32_t size) { - // TODO(Hachem): Implement Vulkan texture data setting } void VulkanTexture2D::Bind(uint32_t slot) const { - // TODO(Hachem): Implement Vulkan texture binding } void VulkanTexture2D::BindAsImage(uint32_t slot, bool readOnly) const { - // TODO(Hachem): Implement Vulkan texture image binding + } + + // Vulkan Cubemap Implementation (Placeholder) + VulkanCubemapTexture::VulkanCubemapTexture(uint32_t width, uint32_t height) + : m_Width(width), m_Height(height) + { + m_InternalFormat = 0; + m_DataFormat = 0; + m_RendererID = 0; + } + + VulkanCubemapTexture::VulkanCubemapTexture(const std::string& path) + : m_Path(path) + { + m_Width = 1024; + m_Height = 1024; + m_InternalFormat = 0; + m_DataFormat = 0; + m_RendererID = 0; + } + + VulkanCubemapTexture::~VulkanCubemapTexture() + { + } + + void VulkanCubemapTexture::SetData(void* data, uint32_t size) + { + } + + void VulkanCubemapTexture::Bind(uint32_t slot) const + { + } + + void VulkanCubemapTexture::BindAsImage(uint32_t slot, bool readOnly) const + { } }; -- cgit v1.3