aboutsummaryrefslogtreecommitdiff
path: root/src/Rendering/Texture.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-20 02:27:02 +0200
committerhachem <im@hachem.wtf>2026-08-20 02:40:07 +0200
commit5b361d81dbd2af0d0e99b9eb1adebea76ff05db0 (patch)
tree34db1df17e8c7248aeeb92156d635d31c2484e3f /src/Rendering/Texture.h
parente3abaaf59777258ba06705135a0cafcb5918ad12 (diff)
[chore]: MASSIVE refactor + more vulkan bs
Diffstat (limited to 'src/Rendering/Texture.h')
-rw-r--r--src/Rendering/Texture.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/Rendering/Texture.h b/src/Rendering/Texture.h
index 3e53b2d..e9b3e0a 100644
--- a/src/Rendering/Texture.h
+++ b/src/Rendering/Texture.h
@@ -1,6 +1,6 @@
#pragma once
-#include "Core/Memory.h"
+#include "core/memory.h"
#include <string>
#include <glm/glm.hpp>
@@ -12,14 +12,14 @@ namespace Donut
public:
virtual ~Texture() = default;
- virtual uint32_t GetWidth() const = 0;
- virtual uint32_t GetHeight() const = 0;
- virtual uint32_t GetRendererID() const = 0;
+ virtual auto get_width() const -> uint32_t = 0;
+ virtual auto get_height() const -> uint32_t = 0;
+ virtual auto get_renderer_id() const -> uint32_t = 0;
- virtual void SetData(void* data, uint32_t size) = 0;
- virtual void Bind(uint32_t slot = 0) const = 0;
- virtual void BindAsImage(uint32_t slot = 0,
- bool readOnly = false) const = 0;
+ virtual auto set_data(void* data, uint32_t size) -> void = 0;
+ virtual auto bind(uint32_t slot = 0) const -> void = 0;
+ virtual void bind_as_image(uint32_t slot = 0,
+ bool read_only = false) const = 0;
virtual bool operator==(const Texture& other) const = 0;
};
@@ -28,15 +28,15 @@ namespace Donut
: public Texture
{
public:
- static Ref<Texture2D> Create(uint32_t width, uint32_t height);
- static Ref<Texture2D> Create(const std::string& path);
+ static auto create(uint32_t width, uint32_t height) -> Ref<Texture2D>;
+ static auto create(const std::string& path) -> Ref<Texture2D>;
};
class CubemapTexture
: public Texture
{
public:
- static Ref<CubemapTexture> Create(uint32_t width, uint32_t height);
- static Ref<CubemapTexture> CreateFromHDRI(const std::string& path);
+ static auto create(uint32_t width, uint32_t height) -> Ref<CubemapTexture>;
+ static auto create_from_hdri(const std::string& path) -> Ref<CubemapTexture>;
};
}; \ No newline at end of file