blob: 0b1b2b69c6eb4a813ac79c717e01052d3a2bd966 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
#include <cstdint>
namespace Donut
{
class IndexBuffer
{
public:
IndexBuffer(const uint32_t* indices, uint32_t count);
~IndexBuffer();
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;
};
};
|