Omnidome
Fulldome Mapping Software Toolkit
|
Utility class for storing and drawing VBO data. More...
#include <VertexVBO.h>
Public Types | |
typedef std::vector< Vertex > | vertex_buffer_type |
Vertex buffer type. More... | |
typedef std::vector< uint32_t > | index_buffer_type |
Index buffer type. More... | |
Public Member Functions | |
VertexVBO () | |
VertexVBO (vertex_buffer_type const &_vertices, index_buffer_type const &_indices) | |
void | buffer (vertex_buffer_type const &_vertices, index_buffer_type const &_indices) |
Copy buffers to GPU. More... | |
void | bind () const |
Bind buffer for drawing. More... | |
void | draw () const |
Draw buffer as triangles. More... | |
void | draw (uint32_t _numIndices, GLuint _drawType=GL_TRIANGLES) const |
Draw specific indices from buffer as triangles. More... | |
void | unbind () const |
Unbind buffer. More... | |
template<typename... ARGS> | |
void | bindAndDraw (ARGS &&..._args) const |
size_t | numIndices () const |
Return number of indices in this buffer. More... | |
size_t | numTriangles () const |
Number of triangles = number of indices / 3. More... | |
VBO const & | vertexVbo () const |
Return vertex vertex buffer object. More... | |
VBO const & | indexVbo () const |
Return index vertex buffer object. More... | |
Private Attributes | |
size_t | numIndices_ = 0 |
std::unique_ptr< VBO > | vertexVbo_ |
std::unique_ptr< VBO > | indexVbo_ |
Utility class for storing and drawing VBO data.
typedef std::vector<uint32_t> omni::visual::VertexVBO::index_buffer_type |
Index buffer type.
typedef std::vector<Vertex> omni::visual::VertexVBO::vertex_buffer_type |
Vertex buffer type.
omni::visual::VertexVBO::VertexVBO | ( | vertex_buffer_type const & | _vertices, |
index_buffer_type const & | _indices | ||
) |
void omni::visual::VertexVBO::bind | ( | ) | const |
Bind buffer for drawing.
|
inline |
void omni::visual::VertexVBO::buffer | ( | vertex_buffer_type const & | _vertices, |
index_buffer_type const & | _indices | ||
) |
Copy buffers to GPU.
void omni::visual::VertexVBO::draw | ( | ) | const |
Draw buffer as triangles.
void omni::visual::VertexVBO::draw | ( | uint32_t | _numIndices, |
GLuint | _drawType = GL_TRIANGLES |
||
) | const |
Draw specific indices from buffer as triangles.
VBO const & omni::visual::VertexVBO::indexVbo | ( | ) | const |
Return index vertex buffer object.
size_t omni::visual::VertexVBO::numIndices | ( | ) | const |
Return number of indices in this buffer.
|
inline |
Number of triangles = number of indices / 3.
void omni::visual::VertexVBO::unbind | ( | ) | const |
Unbind buffer.
VBO const & omni::visual::VertexVBO::vertexVbo | ( | ) | const |
Return vertex vertex buffer object.
|
private |
|
private |
|
private |