Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
Base interface for all DrawElements* sub classes. More...
#include <DrawElements.hpp>
Public Member Functions | |
virtual bool | primitiveRestartEnabled () const |
Returns whether the primitive-restart functionality is enabled or not (requires OpenGL 3.1). | |
void | setPrimitiveRestartEnabled (bool enabled) |
Enables the primitive-restart functionality (requires OpenGL 3.1). | |
void | setInstances (int instances) |
Sets the number of instances for this set of primitives. | |
int | instances () const |
Returns the number of instances for this set of primitives. | |
void | setBaseVertex (int base_vertex) |
If base_vertx is != 0 glDrawElementsBaseVertex/glDrawElementsInstancedBaseVertex will be used instead of their non *BaseVertx counterparts. | |
int | baseVertex () const |
Returns the currently used base vertex. | |
Protected Attributes | |
int | mInstances |
bool | mPrimitiveRestartEnabled |
GLuint | mBaseVertex |
Base interface for all DrawElements* sub classes.
Implements the index-type-independent interface of the class. That is you can cast to DrawElementsBase* and access its members without needing to know whether the actual class is a vl::DrawElementsUInt, vl::DrawElementsUShort or vl::DrawElementsUByte.
Definition at line 53 of file DrawElements.hpp.
virtual bool vl::DrawElementsBase::primitiveRestartEnabled | ( | ) | const [inline, virtual] |
Returns whether the primitive-restart functionality is enabled or not (requires OpenGL 3.1).
See http://www.opengl.org/sdk/docs/man3/xhtml/glPrimitiveRestartIndex.xml
Reimplemented from vl::DrawCall.
Definition at line 59 of file DrawElements.hpp.
References mPrimitiveRestartEnabled.
Referenced by vl::VLXClassWrapper_DrawCall::exportDrawCall(), vl::DrawElements< ArrayUShort1 >::render(), and vl::DrawElements< ArrayUShort1 >::triangleIterator().
void vl::DrawElementsBase::setPrimitiveRestartEnabled | ( | bool | enabled ) | [inline] |
Enables the primitive-restart functionality (requires OpenGL 3.1).
See http://www.opengl.org/sdk/docs/man3/xhtml/glPrimitiveRestartIndex.xml
Definition at line 62 of file DrawElements.hpp.
References mPrimitiveRestartEnabled.
Referenced by vl::VLXClassWrapper_DrawCall::importDrawCall().
void vl::DrawElementsBase::setInstances | ( | int | instances ) | [inline] |
Sets the number of instances for this set of primitives.
Definition at line 65 of file DrawElements.hpp.
References instances(), and mInstances.
Referenced by vl::VLXClassWrapper_DrawCall::importDrawCall().
int vl::DrawElementsBase::instances | ( | ) | const [inline, virtual] |
Returns the number of instances for this set of primitives.
Reimplemented from vl::DrawCall.
Definition at line 68 of file DrawElements.hpp.
References mInstances.
Referenced by vl::DrawElements< ArrayUShort1 >::DrawElements(), vl::VLXClassWrapper_DrawCall::exportDrawCall(), vl::DrawElements< ArrayUShort1 >::render(), setInstances(), and vl::Geometry::sortVertices().
void vl::DrawElementsBase::setBaseVertex | ( | int | base_vertex ) | [inline] |
If base_vertx is != 0 glDrawElementsBaseVertex/glDrawElementsInstancedBaseVertex will be used instead of their non *BaseVertx counterparts.
Note that using base_vertx != requires OpenGL 3.2 or higher or ARB_draw_elements_base_vertex. For more information see also http://www.opengl.org/sdk/docs/man3/xhtml/glDrawElementsBaseVertex.xml
Definition at line 74 of file DrawElements.hpp.
References mBaseVertex.
Referenced by vl::VLXClassWrapper_DrawCall::importDrawCall().
int vl::DrawElementsBase::baseVertex | ( | ) | const [inline] |
Returns the currently used base vertex.
For more information see also http://www.opengl.org/sdk/docs/man3/xhtml/glDrawElementsBaseVertex.xml
Definition at line 78 of file DrawElements.hpp.
References mBaseVertex.
Referenced by vl::VLXClassWrapper_DrawCall::exportDrawCall(), vl::Geometry::shrinkDrawCalls(), vl::Geometry::sortVertices(), and vl::DrawElements< ArrayUShort1 >::triangleIterator().
int vl::DrawElementsBase::mInstances [protected] |
Definition at line 81 of file DrawElements.hpp.
Referenced by vl::DrawElements< ArrayUShort1 >::DrawElements(), instances(), vl::DrawElements< ArrayUShort1 >::operator=(), and setInstances().
bool vl::DrawElementsBase::mPrimitiveRestartEnabled [protected] |
Definition at line 82 of file DrawElements.hpp.
Referenced by vl::DrawElements< ArrayUShort1 >::DrawElements(), vl::DrawElements< ArrayUShort1 >::indexIterator(), vl::DrawElements< ArrayUShort1 >::operator=(), primitiveRestartEnabled(), and setPrimitiveRestartEnabled().
GLuint vl::DrawElementsBase::mBaseVertex [protected] |
Definition at line 83 of file DrawElements.hpp.
Referenced by baseVertex(), vl::DrawElements< ArrayUShort1 >::DrawElements(), vl::DrawElements< ArrayUShort1 >::indexIterator(), vl::DrawElements< ArrayUShort1 >::operator=(), vl::DrawElements< ArrayUShort1 >::render(), and setBaseVertex().