|
cangine
|
Wraps an OpenGL Element Buffer Object (index buffer). More...
#include <ebo.hpp>
Public Member Functions | |
| EBO () | |
| Generates the underlying OpenGL buffer object. | |
| void | update (const std::vector< unsigned int > &indices) |
| Uploads index data to the buffer. | |
| void | bind () |
| Binds the buffer as the current element array buffer. | |
Private Attributes | |
| unsigned int | ID |
| OpenGL buffer object handle. | |
Wraps an OpenGL Element Buffer Object (index buffer).
Stores the index data that tells the GPU which vertices form each primitive, allowing vertices to be reused across triangles.
| cangine::EBO::EBO | ( | ) |
Generates the underlying OpenGL buffer object.
| void cangine::EBO::bind | ( | ) |
Binds the buffer as the current element array buffer.
| void cangine::EBO::update | ( | const std::vector< unsigned int > & | indices | ) |
Uploads index data to the buffer.
| indices | Vertex indices defining the primitives. |
|
private |
OpenGL buffer object handle.