aboutsummaryrefslogtreecommitdiff
path: root/src/rendering/texture_manager.cpp
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-23 17:21:37 +0200
committerhachem <im@hachem.wtf>2026-08-23 17:21:37 +0200
commit3fd33ecff7472e4d6fc9e6b3905f56982e497ef2 (patch)
tree66e5812f1a18b926e88a0dd549fe14e7c7327165 /src/rendering/texture_manager.cpp
parente3aa33fc9a99d8b817bda42a567a4c347e18ab32 (diff)
[feat]: complete RHI api
Diffstat (limited to 'src/rendering/texture_manager.cpp')
-rw-r--r--src/rendering/texture_manager.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/rendering/texture_manager.cpp b/src/rendering/texture_manager.cpp
deleted file mode 100644
index 3afba0d..0000000
--- a/src/rendering/texture_manager.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-#include "texture_manager.h"
-#include "renderer.h"
-
-#include <glad/glad.h>
-
-namespace Donut
-{
- auto TextureManager::create_texture(uint32_t width, uint32_t height) -> Ref<Texture2D>
- {
- return create_ref<Texture2D>(width, height);
- }
-
- auto TextureManager::bind_texture(uint32_t texture_id, uint32_t slot) -> void
- {
- RenderCommand::bind_texture(texture_id, slot);
- }
-
- auto TextureManager::bind_image_texture(uint32_t texture_id, uint32_t slot, bool read_only) -> void
- {
- RenderCommand::bind_image_texture(texture_id, slot, read_only);
- }
-
- auto TextureManager::set_texture_data(uint32_t texture_id, void* data, uint32_t width, uint32_t height) -> void
- {
- glBindTexture(GL_TEXTURE_2D, texture_id);
- glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data);
- }
-
- auto TextureManager::resize_texture(uint32_t texture_id, uint32_t width, uint32_t height) -> void
- {
- glBindTexture(GL_TEXTURE_2D, texture_id);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
- }
-};