diff options
| author | hachem <im@hachem.wtf> | 2025-08-14 00:13:38 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2025-08-14 00:13:38 +0200 |
| commit | 13f2e940700b4451f6bff52eb1666475fd2de72c (patch) | |
| tree | 5908ff643da3caeef9a00cee3ff10931e4698a37 /src/Platform/Vulkan/VulkanTexture.h | |
| parent | 641db1c86bf624527173b0323bd3c832338c3662 (diff) | |
[setup]: Prepare for Vulkan
Diffstat (limited to 'src/Platform/Vulkan/VulkanTexture.h')
| -rw-r--r-- | src/Platform/Vulkan/VulkanTexture.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/Platform/Vulkan/VulkanTexture.h b/src/Platform/Vulkan/VulkanTexture.h new file mode 100644 index 0000000..2dcc3cf --- /dev/null +++ b/src/Platform/Vulkan/VulkanTexture.h @@ -0,0 +1,32 @@ +#pragma once + +#include "Rendering/Texture.h" + +namespace Donut +{ + class VulkanTexture2D + : public Texture2D + { + public: + VulkanTexture2D(uint32_t width, uint32_t height); + VulkanTexture2D(const std::string& path); + virtual ~VulkanTexture2D(); + + virtual uint32_t GetWidth() const override { return m_Width; } + virtual uint32_t GetHeight() const override { return m_Height; } + + virtual void SetData(void* data, uint32_t size) override; + virtual void Bind(uint32_t slot = 0) const override; + + virtual bool operator==(const Texture& other) const override + { + return m_RendererID == ((VulkanTexture2D&)other).m_RendererID; + } + + private: + std::string m_Path; + uint32_t m_Width, m_Height; + uint32_t m_RendererID; + uint32_t m_InternalFormat, m_DataFormat; + }; +}; |
