diff options
| author | hachem <im@hachem.wtf> | 2026-08-23 16:19:19 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-23 16:19:19 +0200 |
| commit | 0ee2712029f53175552d459f908b163ad61de197 (patch) | |
| tree | a58bc213d91acb8b42aec0b19cd678e63bb3ecd4 /src/rendering/texture_manager.cpp | |
| parent | 380b4d5d5a3e66d89ca7b3b1601bb23e5a01bf7b (diff) | |
feat: RHI interface with shared scene and black hole renderers
Diffstat (limited to 'src/rendering/texture_manager.cpp')
| -rw-r--r-- | src/rendering/texture_manager.cpp | 34 |
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); - } -}; |
