GL++  0.1
OpenGL API C++ Wrapper
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Groups Pages
glpp::vertex_array Struct Reference

Object to handle a vertex array object. More...

#include <vertex_array.hpp>

Inheritance diagram for glpp::vertex_array:
glpp::named_object< GLuint > glpp::noncopyable

Public Member Functions

 vertex_array (primitive_type primitives=primitive_type::TRIANGLES)
 Construct an empty vertex array object.
 ~vertex_array ()
 Destroy this vertex array object.
void bind () const
 Bind this buffer as active vertex array object.
shared_vertex_attrib_array_tattrib (GLuint index)
 Access properties object of an attribute (by index)
void set_primitive (primitive_type mode)
 Set primitive type when drawing.
primitive_type get_primitive () const
 Get primitive type when drawing.
void draw (GLint first, GLint count)
 Draw this vertex array.
void draw_elements (GLint count, const GLubyte *pindices)
 Draw this vertex array using vertex indices (GLubyte)
void draw_elements (GLint count, const GLushort *pindices)
 Draw this vertex array using vertex indices (GLushort)
void draw_elements (GLint count, const GLuint *pindices)
 Draw this vertex array using vertex indices (GLuint)
void draw_elements (GLint count, const buffer &elem_array, elements_type type)
 Draw this vertex array using vertex indices (Elements array buffer object )
void draw_instances (GLint first, GLint count, GLint instances)
 Draw this vertex array multiple times (instanced)
void draw_elements_instances (GLint count, const GLubyte *pindices, GLint instances)
 Draw this vertex array using vertex indices (GLubyte), multiple times (instanced)
void draw_elements_instances (GLint count, const GLushort *pindices, GLint instances)
 Draw this vertex array using vertex indices (Gushort), multiple times (instanced)
void draw_elements_instances (GLint count, const GLuint *pindices, GLint instances)
 Draw this vertex array using vertex indices (GLint), multiple times (instanced)
void draw_elements_instances (GLint count, const buffer &elem_array, elements_type type, GLint instances)
 Draw this vertex array using vertex indices (buffer object), multiple times (instanced)
- Public Member Functions inherited from glpp::named_object< GLuint >
name_type object_name () const
 Return the name of object (handle)
- Public Member Functions inherited from glpp::noncopyable
 noncopyable (noncopyable &)
noncopyableoperator= (noncopyable &)

Protected Types

typedef std::map< GLint,
shared_vertex_attrib_array_t
attribs_container_type
 Type of attributes container.

Protected Attributes

attribs_container_type m_attribs
 Map with all attributes.
primitive_type m_primitives
 Primitive type when drawing.
- Protected Attributes inherited from glpp::named_object< GLuint >
GLuint m_gl_name
 Stored object name.

Additional Inherited Members

- Public Types inherited from glpp::named_object< GLuint >
typedef GLuint name_type
 Type of the name.

Detailed Description

Object to handle a vertex array object.

Remarks
non-copyable, non-inheritable, RAII

Constructor & Destructor Documentation

glpp::vertex_array::vertex_array ( primitive_type  primitives = primitive_type::TRIANGLES)

Construct an empty vertex array object.

http://www.opengl.org/sdk/docs/man4/xhtml/glGenBuffers.xml

glpp::vertex_array::~vertex_array ( )

Member Function Documentation

shared_vertex_attrib_array_t & glpp::vertex_array::attrib ( GLuint  index)

Access properties object of an attribute (by index)

Parameters
indexThe index of attribute to access
void glpp::vertex_array::bind ( ) const
inline

Bind this buffer as active vertex array object.

http://www.opengl.org/sdk/docs/man4/xhtml/glBindVertexArray.xml

void glpp::vertex_array::draw ( GLint  first,
GLint  count 
)
void glpp::vertex_array::draw_elements ( GLint  count,
const GLubyte *  pindices 
)

Draw this vertex array using vertex indices (GLubyte)

http://www.opengl.org/sdk/docs/man4/xhtml/glDrawElements.xml

See Also
set_primitive()
void glpp::vertex_array::draw_elements ( GLint  count,
const GLushort *  pindices 
)

Draw this vertex array using vertex indices (GLushort)

http://www.opengl.org/sdk/docs/man4/xhtml/glDrawElements.xml

See Also
set_primitive()
void glpp::vertex_array::draw_elements ( GLint  count,
const GLuint *  pindices 
)

Draw this vertex array using vertex indices (GLuint)

http://www.opengl.org/sdk/docs/man4/xhtml/glDrawElements.xml

See Also
set_primitive()
void glpp::vertex_array::draw_elements ( GLint  count,
const buffer elem_array,
elements_type  type 
)

Draw this vertex array using vertex indices (Elements array buffer object )

http://www.opengl.org/sdk/docs/man4/xhtml/glDrawElements.xml

See Also
buffer
set_primitive()
void glpp::vertex_array::draw_elements_instances ( GLint  count,
const GLubyte *  pindices,
GLint  instances 
)

Draw this vertex array using vertex indices (GLubyte), multiple times (instanced)

http://www.opengl.org/sdk/docs/man4/xhtml/glDrawElementsInstanced.xml

See Also
set_primitive()
void glpp::vertex_array::draw_elements_instances ( GLint  count,
const GLushort *  pindices,
GLint  instances 
)

Draw this vertex array using vertex indices (Gushort), multiple times (instanced)

http://www.opengl.org/sdk/docs/man4/xhtml/glDrawElementsInstanced.xml

See Also
set_primitive()
void glpp::vertex_array::draw_elements_instances ( GLint  count,
const GLuint *  pindices,
GLint  instances 
)

Draw this vertex array using vertex indices (GLint), multiple times (instanced)

http://www.opengl.org/sdk/docs/man4/xhtml/glDrawElementsInstanced.xml

See Also
set_primitive()
void glpp::vertex_array::draw_elements_instances ( GLint  count,
const buffer elem_array,
elements_type  type,
GLint  instances 
)

Draw this vertex array using vertex indices (buffer object), multiple times (instanced)

http://www.opengl.org/sdk/docs/man4/xhtml/glDrawElementsInstanced.xml

See Also
buffer
set_primitive()
void glpp::vertex_array::draw_instances ( GLint  first,
GLint  count,
GLint  instances 
)

Draw this vertex array multiple times (instanced)

http://www.opengl.org/sdk/docs/man4/xhtml/glDrawArraysInstanced.xml

See Also
set_primitive()

The documentation for this struct was generated from the following files: