Practical Tools for Simple Design
Loading...
Searching...
No Matches
IndexBuffer.hpp
1#ifndef CORE_INDEX_BUFFER_HPP
2#define CORE_INDEX_BUFFER_HPP
3
4#include "pch.hpp" // IWYU pragma: export
5
6namespace Core {
12public:
13 explicit IndexBuffer(const std::vector<unsigned int> &indices);
14 IndexBuffer(const IndexBuffer &) = delete;
15 IndexBuffer(IndexBuffer &&other);
16
18
19 IndexBuffer &operator=(const IndexBuffer &) = delete;
20 IndexBuffer &operator=(IndexBuffer &&other);
21
22 size_t GetCount() const { return m_Count; }
23
24 void Bind() const;
25 void Unbind() const;
26
27private:
28 GLuint m_BufferId;
29
30 size_t m_Count;
31};
32} // namespace Core
33
34#endif
Wrapper for OpenGL Index Buffer Object (a.k.a GL_ELEMENT_ARRAY_BUFFER)
Definition: IndexBuffer.hpp:11
Core functionality of the framework
Definition: config.hpp:7