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.
Definition at line 53 of file DrawElements.hpp.
| 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.
Definition at line 58 of file DrawElements.hpp.
References mPrimitiveRestartIndex.
Referenced by vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render(), and vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::triangleIterator().
| 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.
Definition at line 62 of file DrawElements.hpp.
References mPrimitiveRestartIndex.
| 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
Definition at line 65 of file DrawElements.hpp.
References mPrimitiveRestartEnabled.
Referenced by vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render(), and vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::triangleIterator().
| void vl::DrawElementsBase::setPrimitiveRestartEnabled | ( | bool | enabled ) | [inline] |
Enables the primitive-restart functionality.
See http://www.opengl.org/registry/specs/NV/primitive_restart.txt
Definition at line 68 of file DrawElements.hpp.
References mPrimitiveRestartEnabled.
| void vl::DrawElementsBase::setInstances | ( | int | instances ) | [inline] |
Sets the number of instances for this set of primitives.
Definition at line 71 of file DrawElements.hpp.
References instances(), and mInstances.
| int vl::DrawElementsBase::instances | ( | ) | const [inline, virtual] |
Returns the number of instances for this set of primitives.
Reimplemented from vl::DrawCall.
Definition at line 74 of file DrawElements.hpp.
References mInstances.
Referenced by vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::DrawElements(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::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 80 of file DrawElements.hpp.
References mBaseVertex.
| 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 84 of file DrawElements.hpp.
References mBaseVertex.
Referenced by vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::triangleIterator().
int vl::DrawElementsBase::mInstances [protected] |
Definition at line 87 of file DrawElements.hpp.
Referenced by vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::DrawElements(), instances(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::operator=(), and setInstances().
GLuint vl::DrawElementsBase::mPrimitiveRestartIndex [protected] |
Definition at line 88 of file DrawElements.hpp.
Referenced by vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::DrawElements(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::indexIterator(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::operator=(), primitiveRestartIndex(), and setPrimitiveRestartIndex().
bool vl::DrawElementsBase::mPrimitiveRestartEnabled [protected] |
Definition at line 89 of file DrawElements.hpp.
Referenced by vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::DrawElements(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::indexIterator(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::operator=(), primitiveRestartEnabled(), and setPrimitiveRestartEnabled().
int vl::DrawElementsBase::mBaseVertex [protected] |
Definition at line 90 of file DrawElements.hpp.
Referenced by baseVertex(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::DrawElements(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::indexIterator(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::operator=(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render(), and setBaseVertex().