diff options
Diffstat (limited to 'src/Rendering/Texture.h')
| -rw-r--r-- | src/Rendering/Texture.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Rendering/Texture.h b/src/Rendering/Texture.h new file mode 100644 index 0000000..eebce85 --- /dev/null +++ b/src/Rendering/Texture.h @@ -0,0 +1,30 @@ +#pragma once + +#include <memory> +#include <string> +#include <glm/glm.hpp> + +namespace Donut +{ + class Texture + { + public: + virtual ~Texture() = default; + + virtual uint32_t GetWidth() const = 0; + virtual uint32_t GetHeight() const = 0; + virtual uint32_t GetRendererID() const = 0; + + virtual void SetData(void* data, uint32_t size) = 0; + virtual void Bind(uint32_t slot = 0) const = 0; + + virtual bool operator==(const Texture& other) const = 0; + }; + + class Texture2D : public Texture + { + public: + static std::shared_ptr<Texture2D> Create(uint32_t width, uint32_t height); + static std::shared_ptr<Texture2D> Create(const std::string& path); + }; +};
\ No newline at end of file |
