|
cangine
|
Wraps an OpenGL Vertex Buffer Object. More...
#include <vbo.hpp>
Public Member Functions | |
| VBO () | |
| Generates the underlying OpenGL buffer object. | |
| ~VBO () | |
| Deletes the underlying OpenGL buffer object. | |
| void | bind () const |
| Binds the buffer as the current array buffer. | |
| void | unbind () const |
| Unbinds the current array buffer. | |
| void | update (const void *data, size_t size) |
| Uploads raw vertex data to the buffer. | |
Private Attributes | |
| unsigned int | ID |
| OpenGL buffer object handle. | |
Wraps an OpenGL Vertex Buffer Object.
Holds raw vertex data on the GPU. Use VAO to describe how this data is laid out for the shader.
| cangine::VBO::VBO | ( | ) |
Generates the underlying OpenGL buffer object.
| cangine::VBO::~VBO | ( | ) |
Deletes the underlying OpenGL buffer object.
| void cangine::VBO::bind | ( | ) | const |
Binds the buffer as the current array buffer.
| void cangine::VBO::unbind | ( | ) | const |
Unbinds the current array buffer.
| void cangine::VBO::update | ( | const void * | data, |
| size_t | size | ||
| ) |
Uploads raw vertex data to the buffer.
| data | Pointer to the raw vertex data. |
| size | Size of the data in bytes. |
|
private |
OpenGL buffer object handle.