2025-01-11 17:48:48 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class IndexBuffer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
IndexBuffer(const unsigned int* data, unsigned int count);
|
|
|
|
~IndexBuffer();
|
|
|
|
|
2025-01-12 15:53:46 +00:00
|
|
|
// Disallow copy operations
|
|
|
|
IndexBuffer(const IndexBuffer&) = delete;
|
|
|
|
IndexBuffer& operator=(const IndexBuffer&) = delete;
|
|
|
|
|
|
|
|
// Enable move operations
|
|
|
|
IndexBuffer(IndexBuffer&& other) noexcept;
|
|
|
|
IndexBuffer& operator=(IndexBuffer&& other) noexcept;
|
|
|
|
|
2025-01-11 17:48:48 +00:00
|
|
|
void Bind() const;
|
|
|
|
void Unbind() const;
|
|
|
|
|
|
|
|
inline unsigned int GetCount() const { return m_Count; }
|
2025-01-11 18:56:38 +00:00
|
|
|
private:
|
2025-01-12 15:53:46 +00:00
|
|
|
unsigned int m_RendererID = 0;
|
|
|
|
unsigned int m_Count = 0;
|
2025-01-11 17:48:48 +00:00
|
|
|
};
|