Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
Wrapper for the OpenGL function glMultiDrawElements(). More...
#include <MultiDrawElements.hpp>
Public Member Functions | |
| virtual const char * | className () |
| Returns the name of the class. | |
| MultiDrawElements (EPrimitiveType primitive=PT_TRIANGLES) | |
| MultiDrawElements & | operator= (const MultiDrawElements &other) |
| virtual ref< DrawCall > | clone () const |
| virtual unsigned int | handle () const |
| arr_type * | indices () |
| const arr_type * | indices () const |
| virtual void | updateVBOs (bool discard_local_data=false, bool force_update=false) |
| virtual void | deleteVBOs () |
| virtual void | clearLocalBuffer () |
| virtual void | render (bool use_vbo) const |
| TriangleIterator | triangleIterator () const |
| Returns a TriangleIterator used to iterate through the triangles of a DrawCall. | |
| IndexIterator | indexIterator () const |
| Returns a IndexIterator used to iterate through the virtual indices of a DrawCall. | |
| const std::vector< const typename arr_type::scalar_type * > & | pointerVector () const |
| The pointer vector used as 'indices' parameter of glMultiDrawElements. | |
Protected Member Functions | |
| void | compute_pointer_vector () |
Protected Attributes | |
| ref< arr_type > | mIndexBuffer |
| std::vector< const typename arr_type::scalar_type * > | mPointerVector |
| std::vector< const typename arr_type::scalar_type * > | mNULLPointerVector |
Wrapper for the OpenGL function glMultiDrawElements().
See also http://www.opengl.org/sdk/docs/man/xhtml/glMultiDrawElements.xml for more information.
Features supported:
Use the functions setPrimitiveRestartIndex() and setPrimitiveRestartEnabled() to use the primitive restart functionality (requires OpenGL 3.1). For more information see http://www.opengl.org/sdk/docs/man3/xhtml/glPrimitiveRestartIndex.xml
Use the function setBaseVertices() to use the base vertex functionality. Requires OpenGL 3.2 or GL_ARB_draw_elements_base_vertex. For more information see http://www.opengl.org/sdk/docs/man3/xhtml/glMultiDrawElementsBaseVertex.xml
DrawElements, MultiDrawElements, DrawRangeElements, DrawArrays are used by Geometry to define a set of primitives to be rendered, see Geometry::drawCalls(). The indices are stored in a GLBufferObject and thus they can be stored locally or on the GPU. To gain direct access to the GLBufferObject use the indices() function.
Definition at line 123 of file MultiDrawElements.hpp.
| vl::MultiDrawElements< Tgltype, arr_type >::MultiDrawElements | ( | EPrimitiveType | primitive = PT_TRIANGLES ) |
[inline] |
Definition at line 128 of file MultiDrawElements.hpp.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::clone().
| virtual const char* vl::MultiDrawElements< Tgltype, arr_type >::className | ( | ) | [inline, virtual] |
Returns the name of the class.
Reimplemented from vl::DrawCall.
Definition at line 126 of file MultiDrawElements.hpp.
| MultiDrawElements& vl::MultiDrawElements< Tgltype, arr_type >::operator= | ( | const MultiDrawElements< Tgltype, arr_type > & | other ) | [inline] |
Definition at line 137 of file MultiDrawElements.hpp.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::operator=().
| virtual ref<DrawCall> vl::MultiDrawElements< Tgltype, arr_type >::clone | ( | ) | const [inline, virtual] |
Implements vl::DrawCall.
Definition at line 147 of file MultiDrawElements.hpp.
| virtual unsigned int vl::MultiDrawElements< Tgltype, arr_type >::handle | ( | ) | const [inline, virtual] |
Implements vl::DrawCall.
Definition at line 154 of file MultiDrawElements.hpp.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render().
| arr_type* vl::MultiDrawElements< Tgltype, arr_type >::indices | ( | ) | [inline] |
Definition at line 156 of file MultiDrawElements.hpp.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::clearLocalBuffer(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::compute_pointer_vector(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::deleteVBOs(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::handle(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::operator=(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render(), and vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::updateVBOs().
| const arr_type* vl::MultiDrawElements< Tgltype, arr_type >::indices | ( | ) | const [inline] |
Definition at line 158 of file MultiDrawElements.hpp.
| virtual void vl::MultiDrawElements< Tgltype, arr_type >::updateVBOs | ( | bool | discard_local_data = false, |
| bool | force_update = false |
||
| ) | [inline, virtual] |
Implements vl::DrawCall.
Definition at line 160 of file MultiDrawElements.hpp.
| virtual void vl::MultiDrawElements< Tgltype, arr_type >::deleteVBOs | ( | ) | [inline, virtual] |
Implements vl::DrawCall.
Definition at line 166 of file MultiDrawElements.hpp.
| virtual void vl::MultiDrawElements< Tgltype, arr_type >::clearLocalBuffer | ( | ) | [inline, virtual] |
Definition at line 171 of file MultiDrawElements.hpp.
| virtual void vl::MultiDrawElements< Tgltype, arr_type >::render | ( | bool | use_vbo ) | const [inline, virtual] |
Implements vl::DrawCall.
Definition at line 176 of file MultiDrawElements.hpp.
| TriangleIterator vl::MultiDrawElements< Tgltype, arr_type >::triangleIterator | ( | ) | const [virtual] |
Returns a TriangleIterator used to iterate through the triangles of a DrawCall.
Basically the iterator tesselates in triangles any DrawCall of type: PT_TRIANGLES, PT_TRIANGLE_STRIP PT_TRIANGLE_FAN, PT_POLYGON, PT_QUADS, PT_QUAD_STRIP.
Implements vl::DrawCall.
Definition at line 312 of file MultiDrawElements.hpp.
References vl::ref< T >::get().
| IndexIterator vl::MultiDrawElements< Tgltype, arr_type >::indexIterator | ( | ) | const [inline, virtual] |
Returns a IndexIterator used to iterate through the virtual indices of a DrawCall.
This
Implements vl::DrawCall.
Definition at line 249 of file MultiDrawElements.hpp.
| const std::vector<const typename arr_type::scalar_type*>& vl::MultiDrawElements< Tgltype, arr_type >::pointerVector | ( | ) | const [inline] |
The pointer vector used as 'indices' parameter of glMultiDrawElements.
Definition at line 259 of file MultiDrawElements.hpp.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render().
| void vl::MultiDrawElements< Tgltype, arr_type >::compute_pointer_vector | ( | ) | [inline, protected, virtual] |
Implements vl::MultiDrawElementsBase.
Definition at line 262 of file MultiDrawElements.hpp.
ref< arr_type > vl::MultiDrawElements< Tgltype, arr_type >::mIndexBuffer [protected] |
std::vector<const typename arr_type::scalar_type*> vl::MultiDrawElements< Tgltype, arr_type >::mPointerVector [protected] |
std::vector<const typename arr_type::scalar_type*> vl::MultiDrawElements< Tgltype, arr_type >::mNULLPointerVector [protected] |
Definition at line 282 of file MultiDrawElements.hpp.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::compute_pointer_vector(), and vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render().