|
lmgl 1.0.0
A lightweight OpenGL graphics engine library written in C++
|
Manages an index buffer in OpenGL. More...
#include <buffer.hpp>
Public Member Functions | |
| IndexBuffer (const unsigned int *indices, unsigned int count) | |
| Constructor for the IndexBuffer. | |
| ~IndexBuffer () | |
| Destructor for the IndexBuffer. | |
| void | bind () const |
| Bind the index buffer. | |
| void | unbind () const |
| Unbind the index buffer. | |
| unsigned int | get_count () const |
| Get the count of indices in the buffer. | |
Manages an index buffer in OpenGL.
This class encapsulates the creation, binding, and management of an index buffer. It stores indices used for indexed drawing and provides methods to bind and unbind the buffer as well as retrieve the count of indices.
| lmgl::renderer::IndexBuffer::IndexBuffer | ( | const unsigned int * | indices, |
| unsigned int | count ) |
Constructor for the IndexBuffer.
Initializes the index buffer with the provided indices and count.
| indices | Pointer to the index data. |
| count | Number of indices. |
| void lmgl::renderer::IndexBuffer::bind | ( | ) | const |
Bind the index buffer.
Activates the index buffer for subsequent rendering operations.
|
inline |
Get the count of indices in the buffer.
Returns the number of indices stored in the index buffer.
| void lmgl::renderer::IndexBuffer::unbind | ( | ) | const |
Unbind the index buffer.
Deactivates the index buffer.