Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
Base interface for all DrawElements* sub classes. More...
#include <DrawElements.hpp>
Public Member Functions | |
| GLuint | primitiveRestartIndex () const |
| Returns the special index which idendifies a primitive restart. | |
| void | setPrimitiveRestartIndex (GLuint index) |
| Sets the special index which idendifies a primitive restart. | |
| bool | primitiveRestartEnabled () const |
| Returns whether the primitive-restart functionality is enabled or not. | |
| void | setPrimitiveRestartEnabled (bool enabled) |
| Enables the primitive-restart functionality. | |
| 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 |
| GLuint | mPrimitiveRestartIndex |
| bool | mPrimitiveRestartEnabled |
| int | 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.
| GLuint vl::DrawElementsBase::primitiveRestartIndex | ( | ) | const [inline] |
Returns the special index which idendifies a primitive restart.
By default it is set to ~0 that is 0xFF, 0xFFFF, 0xFFFFFFFF respectively for ubyte, ushort, uint index types.
| void vl::DrawElementsBase::setPrimitiveRestartIndex | ( | GLuint | index ) | [inline] |
Sets the special index which idendifies a primitive restart.
By default it is set to ~0 that is 0xFF, 0xFFFF, 0xFFFFFFFF respectively for ubyte, ushort, uint index types.
| bool vl::DrawElementsBase::primitiveRestartEnabled | ( | ) | const [inline] |
Returns whether the primitive-restart functionality is enabled or not.
See http://www.opengl.org/registry/specs/NV/primitive_restart.txt
| void vl::DrawElementsBase::setPrimitiveRestartEnabled | ( | bool | enabled ) | [inline] |
Enables the primitive-restart functionality.
See http://www.opengl.org/registry/specs/NV/primitive_restart.txt
| void vl::DrawElementsBase::setInstances | ( | int | instances ) | [inline] |
Sets the number of instances for this set of primitives.
| int vl::DrawElementsBase::instances | ( | ) | const [inline, virtual] |
Returns the number of instances for this set of primitives.
Reimplemented from vl::DrawCall.
| 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
| 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
int vl::DrawElementsBase::mInstances [protected] |
GLuint vl::DrawElementsBase::mPrimitiveRestartIndex [protected] |
bool vl::DrawElementsBase::mPrimitiveRestartEnabled [protected] |
int vl::DrawElementsBase::mBaseVertex [protected] |