diff options
| author | hachem <im@hachem.wtf> | 2026-08-20 22:20:49 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-20 22:20:49 +0200 |
| commit | 45baf48db974c66cfdc51f26cee191abbbd89a0b (patch) | |
| tree | b60c27506f1e1c37b7238161156c83e7e159fc12 /src/rendering/index_buffer.h | |
| parent | 00bf9a8cce28ab1dbc77ba24428be12391c4a576 (diff) | |
[feat]: reduce renderer abstraction
Diffstat (limited to 'src/rendering/index_buffer.h')
| -rw-r--r-- | src/rendering/index_buffer.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/rendering/index_buffer.h b/src/rendering/index_buffer.h index 8389f2d..0b1b2b6 100644 --- a/src/rendering/index_buffer.h +++ b/src/rendering/index_buffer.h @@ -7,12 +7,17 @@ namespace Donut class IndexBuffer { public: - virtual ~IndexBuffer() = default; + IndexBuffer(const uint32_t* indices, uint32_t count); + ~IndexBuffer(); - virtual auto bind() const -> void = 0; - virtual auto unbind() const -> void = 0; - virtual auto get_count() const -> uint32_t = 0; + auto bind() const -> void; + auto unbind() const -> void; + auto get_count() const -> uint32_t { return m_count; } static auto create(const uint32_t* indices, uint32_t count) -> IndexBuffer*; + + private: + uint32_t m_renderer_id = 0; + uint32_t m_count = 0; }; }; |
