Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
Wrapper for the OpenGL function glDrawRangeElements(). More...
#include <DrawRangeElements.hpp>
Classes | |
| class | Triangle |
Public Member Functions | |
| virtual const char * | className () |
| Returns the name of the class. | |
| DrawRangeElements (EPrimitiveType primitive=PT_TRIANGLES, int r_start=0, int r_end=index_type(~0)) | |
| DrawRangeElements & | operator= (const DrawRangeElements &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. | |
| void | computeRange () |
Protected Attributes | |
| ref< arr_type > | mIndexBuffer |
Wrapper for the OpenGL function glDrawRangeElements().
See also http://www.opengl.org/sdk/docs/man3/xhtml/glDrawRangeElements.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 setBaseVertex() 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/glDrawRangeElementsBaseVertex.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 122 of file DrawRangeElements.hpp.
| vl::DrawRangeElements< index_type, Tgltype, arr_type >::DrawRangeElements | ( | EPrimitiveType | primitive = PT_TRIANGLES, |
| int | r_start = 0, |
||
| int | r_end = index_type(~0) |
||
| ) | [inline] |
Definition at line 152 of file DrawRangeElements.hpp.
Referenced by vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::clone().
| virtual const char* vl::DrawRangeElements< index_type, Tgltype, arr_type >::className | ( | ) | [inline, virtual] |
Returns the name of the class.
Reimplemented from vl::DrawCall.
Definition at line 150 of file DrawRangeElements.hpp.
| DrawRangeElements& vl::DrawRangeElements< index_type, Tgltype, arr_type >::operator= | ( | const DrawRangeElements< index_type, Tgltype, arr_type > & | other ) | [inline] |
Definition at line 164 of file DrawRangeElements.hpp.
Referenced by vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::operator=().
| virtual ref<DrawCall> vl::DrawRangeElements< index_type, Tgltype, arr_type >::clone | ( | ) | const [inline, virtual] |
Implements vl::DrawCall.
Definition at line 176 of file DrawRangeElements.hpp.
| virtual unsigned int vl::DrawRangeElements< index_type, Tgltype, arr_type >::handle | ( | ) | const [inline, virtual] |
Implements vl::DrawCall.
Definition at line 183 of file DrawRangeElements.hpp.
Referenced by vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::render().
| arr_type* vl::DrawRangeElements< index_type, Tgltype, arr_type >::indices | ( | ) | [inline] |
Definition at line 185 of file DrawRangeElements.hpp.
Referenced by vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::clearLocalBuffer(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::deleteVBOs(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::handle(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::operator=(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::render(), and vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::updateVBOs().
| const arr_type* vl::DrawRangeElements< index_type, Tgltype, arr_type >::indices | ( | ) | const [inline] |
Definition at line 187 of file DrawRangeElements.hpp.
| virtual void vl::DrawRangeElements< index_type, Tgltype, arr_type >::updateVBOs | ( | bool | discard_local_data = false, |
| bool | force_update = false |
||
| ) | [inline, virtual] |
Implements vl::DrawCall.
Definition at line 189 of file DrawRangeElements.hpp.
| virtual void vl::DrawRangeElements< index_type, Tgltype, arr_type >::deleteVBOs | ( | ) | [inline, virtual] |
Implements vl::DrawCall.
Definition at line 195 of file DrawRangeElements.hpp.
| virtual void vl::DrawRangeElements< index_type, Tgltype, arr_type >::clearLocalBuffer | ( | ) | [inline, virtual] |
Definition at line 200 of file DrawRangeElements.hpp.
| virtual void vl::DrawRangeElements< index_type, Tgltype, arr_type >::render | ( | bool | use_vbo ) | const [inline, virtual] |
Implements vl::DrawCall.
Definition at line 205 of file DrawRangeElements.hpp.
| TriangleIterator vl::DrawRangeElements< index_type, Tgltype, arr_type >::triangleIterator | ( | ) | const [inline, 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 265 of file DrawRangeElements.hpp.
| IndexIterator vl::DrawRangeElements< index_type, 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 274 of file DrawRangeElements.hpp.
Referenced by vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::computeRange().
| void vl::DrawRangeElements< index_type, Tgltype, arr_type >::computeRange | ( | ) | [inline] |
Definition at line 283 of file DrawRangeElements.hpp.
ref< arr_type > vl::DrawRangeElements< index_type, Tgltype, arr_type >::mIndexBuffer [protected] |
Definition at line 304 of file DrawRangeElements.hpp.
Referenced by vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::DrawRangeElements(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::indexIterator(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::indices(), and vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::triangleIterator().