MVE - Multi-View Environment mve-devel
|
OpenGL vertex array object abstraction. More...
#include <vertex_array.h>
Public Types | |
typedef std::pair< VertexBuffer::Ptr, std::string > | BoundVBO |
typedef std::shared_ptr< VertexArray const > | ConstPtr |
typedef std::shared_ptr< VertexArray > | Ptr |
typedef std::vector< BoundVBO > | VBOList |
Public Member Functions | |
virtual | ~VertexArray (void) |
void | add_vbo (VertexBuffer::Ptr vbo, std::string const &name) |
Adds a generic VBO with attribute name. | |
void | draw (void) |
Binds the shader and issues drawing commands. | |
void | remove_vbo (std::string const &name) |
Removes a VBO from the list. | |
void | reset_vertex_array (void) |
Removes VBOs and creates a new vertex array. | |
void | set_index_vbo (VertexBuffer::Ptr vbo) |
Sets the vertex indices VBO with triangle definitions. | |
void | set_primitive (GLuint primitive) |
Sets the primitive type to be used with the corresponding draw call. | |
void | set_shader (ShaderProgram::Ptr shader) |
Assigns a shader that is used for drawing the vertex array. | |
void | set_vertex_vbo (VertexBuffer::Ptr vbo) |
Sets the vertex VBO with vertex positions. | |
Static Public Member Functions | |
static Ptr | create (void) |
Protected Member Functions | |
VertexArray (void) | |
void | assign_attrib (BoundVBO const &bound_vbo) |
OpenGL vertex array object abstraction.
Vertex buffer objects (VBOs) may be plugged into this class to compose more complex objects such as colored point sets or meshes with generic per-vertex attributes. Per-vertex attributes are named and automatically associated with shader input variables.
Definition at line 34 of file vertex_array.h.
typedef std::pair<VertexBuffer::Ptr, std::string> ogl::VertexArray::BoundVBO |
Definition at line 40 of file vertex_array.h.
typedef std::shared_ptr<VertexArray const> ogl::VertexArray::ConstPtr |
Definition at line 38 of file vertex_array.h.
typedef std::shared_ptr<VertexArray> ogl::VertexArray::Ptr |
Definition at line 37 of file vertex_array.h.
typedef std::vector<BoundVBO> ogl::VertexArray::VBOList |
Definition at line 41 of file vertex_array.h.
|
inlinevirtual |
Definition at line 97 of file vertex_array.h.
|
inlineprotected |
Definition at line 89 of file vertex_array.h.
|
inline |
Adds a generic VBO with attribute name.
Definition at line 128 of file vertex_array.h.
|
protected |
Definition at line 36 of file vertex_array.cc.
|
inlinestatic |
Definition at line 104 of file vertex_array.h.
void ogl::VertexArray::draw | ( | void | ) |
Binds the shader and issues drawing commands.
Definition at line 56 of file vertex_array.cc.
void ogl::VertexArray::remove_vbo | ( | std::string const & | name | ) |
Removes a VBO from the list.
Definition at line 26 of file vertex_array.cc.
|
inline |
Removes VBOs and creates a new vertex array.
Definition at line 134 of file vertex_array.h.
|
inline |
Sets the vertex indices VBO with triangle definitions.
Definition at line 122 of file vertex_array.h.
|
inline |
Sets the primitive type to be used with the corresponding draw call.
Definition at line 110 of file vertex_array.h.
|
inline |
Assigns a shader that is used for drawing the vertex array.
Definition at line 147 of file vertex_array.h.
|
inline |
Sets the vertex VBO with vertex positions.
Definition at line 116 of file vertex_array.h.