Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
Base interface for all MultiDrawElements* sub classes. More...
#include <MultiDrawElements.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 | setCountVector (const std::vector< GLsizei > &vcount) |
| Sets the vector defining the length of each primitive and automatically computes the pointer vectors used to exectue glMultiDrawElements(). | |
| const std::vector< GLsizei > & | countVector () const |
| The count vector used as 'count' parameter of glMultiDrawElements. | |
| void | setBaseVertices (const std::vector< GLint > &base_verts) |
| Returns the list of base vertices, one for each primitive. | |
| const std::vector< GLint > & | baseVertices () const |
| Returns the list of base vertices, one for each primitive. | |
| std::vector< GLint > & | baseVertices () |
| Returns the list of base vertices, one for each primitive. | |
Protected Member Functions | |
| virtual void | compute_pointer_vector ()=0 |
Protected Attributes | |
| GLuint | mPrimitiveRestartIndex |
| bool | mPrimitiveRestartEnabled |
| std::vector< GLsizei > | mCountVector |
| std::vector< GLint > | mBaseVertices |
Base interface for all MultiDrawElements* sub classes.
Implements the index-type-independent interface of the class. That is you can cast to MultiDrawElementsBase* and access its members without needing to know whether the actual class is a vl::MultiDrawElementsUInt, vl::MultiDrawElementsUShort or vl::MultiDrawElementsUByte.
Definition at line 52 of file MultiDrawElements.hpp.
| GLuint vl::MultiDrawElementsBase::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 57 of file MultiDrawElements.hpp.
References mPrimitiveRestartIndex.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render().
| void vl::MultiDrawElementsBase::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 61 of file MultiDrawElements.hpp.
References mPrimitiveRestartIndex.
| bool vl::MultiDrawElementsBase::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 64 of file MultiDrawElements.hpp.
References mPrimitiveRestartEnabled.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render().
| void vl::MultiDrawElementsBase::setPrimitiveRestartEnabled | ( | bool | enabled ) | [inline] |
Enables the primitive-restart functionality.
See http://www.opengl.org/registry/specs/NV/primitive_restart.txt
Definition at line 67 of file MultiDrawElements.hpp.
References mPrimitiveRestartEnabled.
| void vl::MultiDrawElementsBase::setCountVector | ( | const std::vector< GLsizei > & | vcount ) | [inline] |
Sets the vector defining the length of each primitive and automatically computes the pointer vectors used to exectue glMultiDrawElements().
Definition at line 71 of file MultiDrawElements.hpp.
References compute_pointer_vector(), and mCountVector.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::operator=().
| const std::vector<GLsizei>& vl::MultiDrawElementsBase::countVector | ( | ) | const [inline] |
The count vector used as 'count' parameter of glMultiDrawElements.
Definition at line 78 of file MultiDrawElements.hpp.
References mCountVector.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render().
| void vl::MultiDrawElementsBase::setBaseVertices | ( | const std::vector< GLint > & | base_verts ) | [inline] |
Returns the list of base vertices, one for each primitive.
This will enable the use of glMultiDrawElementsBaseVertex() to render a set of primitives. See also http://www.opengl.org/sdk/docs/man3/xhtml/glMultiDrawElementsBaseVertex.xml
Definition at line 83 of file MultiDrawElements.hpp.
References mBaseVertices.
| const std::vector<GLint>& vl::MultiDrawElementsBase::baseVertices | ( | ) | const [inline] |
Returns the list of base vertices, one for each primitive.
Definition at line 86 of file MultiDrawElements.hpp.
References mBaseVertices.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render().
| std::vector<GLint>& vl::MultiDrawElementsBase::baseVertices | ( | ) | [inline] |
Returns the list of base vertices, one for each primitive.
Definition at line 89 of file MultiDrawElements.hpp.
References mBaseVertices.
| virtual void vl::MultiDrawElementsBase::compute_pointer_vector | ( | ) | [protected, pure virtual] |
GLuint vl::MultiDrawElementsBase::mPrimitiveRestartIndex [protected] |
Definition at line 95 of file MultiDrawElements.hpp.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::indexIterator(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::MultiDrawElements(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::operator=(), primitiveRestartIndex(), and setPrimitiveRestartIndex().
bool vl::MultiDrawElementsBase::mPrimitiveRestartEnabled [protected] |
Definition at line 96 of file MultiDrawElements.hpp.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::indexIterator(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::MultiDrawElements(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::operator=(), primitiveRestartEnabled(), and setPrimitiveRestartEnabled().
std::vector<GLsizei> vl::MultiDrawElementsBase::mCountVector [protected] |
Definition at line 97 of file MultiDrawElements.hpp.
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::compute_pointer_vector(), countVector(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::indexIterator(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::operator=(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render(), and setCountVector().
std::vector<GLint> vl::MultiDrawElementsBase::mBaseVertices [protected] |
Definition at line 98 of file MultiDrawElements.hpp.
Referenced by baseVertices(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::indexIterator(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render(), and setBaseVertices().