Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
The base class of DrawElements, MultiDrawElements, DrawRangeElements, DrawArrays which are used by Geometry to define a set of primitives to be rendered, see Geometry::drawCalls(). More...
#include <DrawCall.hpp>
Public Member Functions | |
| virtual const char * | className () |
| Returns the name of the class. | |
| DrawCall () | |
| DrawCall & | operator= (const DrawCall &other) |
| void | setPrimitiveType (EPrimitiveType type) |
| EPrimitiveType | primitiveType () const |
| virtual void | render (bool use_vbo=true) const =0 |
| virtual ref< DrawCall > | clone () const =0 |
| virtual void | deleteVBOs ()=0 |
| virtual void | updateVBOs (bool discard_local_data=false, bool force_update=false)=0 |
| virtual unsigned int | handle () const =0 |
| void | setEnabled (bool enable) |
| bool | isEnabled () const |
| virtual TriangleIterator | triangleIterator () const =0 |
| Returns a TriangleIterator used to iterate through the triangles of a DrawCall. | |
| virtual IndexIterator | indexIterator () const =0 |
| Returns a IndexIterator used to iterate through the virtual indices of a DrawCall. | |
| int | countIndices () const |
| Counts the number of virtual indices of a DrawCall. | |
| virtual int | instances () const |
| Returns the number of instances for this set of primitives. | |
| void | setPatchParameter (PatchParameter *patch_param) |
| Attach a PatchParameter to a DrawCall to be used when using primitive-type PT_PATCHES. | |
| PatchParameter * | patchParameter () |
| The PatchParameter attached to a DrawCall to be used when using primitive-type PT_PATCHES. | |
| const PatchParameter * | patchParameter () const |
| The PatchParameter attached to a DrawCall to be used when using primitive-type PT_PATCHES. | |
Protected Member Functions | |
| void | applyPatchParameters () const |
Protected Attributes | |
| ref< PatchParameter > | mPatchParameter |
| EPrimitiveType | mType |
| bool | mEnabled |
The base class of DrawElements, MultiDrawElements, DrawRangeElements, DrawArrays which are used by Geometry to define a set of primitives to be rendered, see Geometry::drawCalls().
Definition at line 49 of file DrawCall.hpp.
| vl::DrawCall::DrawCall | ( | ) | [inline] |
Definition at line 54 of file DrawCall.hpp.
| virtual const char* vl::DrawCall::className | ( | ) | [inline, virtual] |
Returns the name of the class.
Reimplemented from vl::Object.
Reimplemented in vl::DrawArrays, vl::DrawElements< Tgltype, arr_type >, vl::DrawRangeElements< index_type, Tgltype, arr_type >, vl::MultiDrawElements< Tgltype, arr_type >, vl::DrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLushort, GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawRangeElements< GLubyte, GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >, vl::MultiDrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::MultiDrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, and vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >.
Definition at line 52 of file DrawCall.hpp.
Definition at line 56 of file DrawCall.hpp.
| void vl::DrawCall::setPrimitiveType | ( | EPrimitiveType | type ) | [inline] |
Definition at line 63 of file DrawCall.hpp.
References mType.
| EPrimitiveType vl::DrawCall::primitiveType | ( | ) | const [inline] |
Definition at line 64 of file DrawCall.hpp.
References mType.
Referenced by vl::DrawArrays::clone(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::render(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render(), vl::DrawArrays::render(), vl::Geometry::sortVertices(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::triangleIterator(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::triangleIterator(), and vl::DrawArrays::triangleIterator().
| virtual void vl::DrawCall::render | ( | bool | use_vbo = true ) |
const [pure virtual] |
Implemented in vl::DrawArrays, vl::DrawElements< Tgltype, arr_type >, vl::DrawRangeElements< index_type, Tgltype, arr_type >, vl::MultiDrawElements< Tgltype, arr_type >, vl::DrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLushort, GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawRangeElements< GLubyte, GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >, vl::MultiDrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::MultiDrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, and vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >.
Referenced by vl::Geometry::render_Implementation().
Implemented in vl::DrawArrays, vl::DrawElements< Tgltype, arr_type >, vl::DrawRangeElements< index_type, Tgltype, arr_type >, vl::MultiDrawElements< Tgltype, arr_type >, vl::DrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLushort, GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawRangeElements< GLubyte, GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >, vl::MultiDrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::MultiDrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, and vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >.
| virtual void vl::DrawCall::deleteVBOs | ( | ) | [pure virtual] |
Implemented in vl::DrawArrays, vl::DrawElements< Tgltype, arr_type >, vl::DrawRangeElements< index_type, Tgltype, arr_type >, vl::MultiDrawElements< Tgltype, arr_type >, vl::DrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLushort, GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawRangeElements< GLubyte, GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >, vl::MultiDrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::MultiDrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, and vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >.
Referenced by vl::Geometry::deleteVBOs().
| virtual void vl::DrawCall::updateVBOs | ( | bool | discard_local_data = false, |
| bool | force_update = false |
||
| ) | [pure virtual] |
Implemented in vl::DrawArrays, vl::DrawElements< Tgltype, arr_type >, vl::DrawRangeElements< index_type, Tgltype, arr_type >, vl::MultiDrawElements< Tgltype, arr_type >, vl::DrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLushort, GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawRangeElements< GLubyte, GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >, vl::MultiDrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::MultiDrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, and vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >.
Referenced by vl::Geometry::updateVBOs().
| virtual unsigned int vl::DrawCall::handle | ( | ) | const [pure virtual] |
Implemented in vl::DrawArrays, vl::DrawElements< Tgltype, arr_type >, vl::DrawRangeElements< index_type, Tgltype, arr_type >, vl::MultiDrawElements< Tgltype, arr_type >, vl::DrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLushort, GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawRangeElements< GLubyte, GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >, vl::MultiDrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::MultiDrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, and vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >.
| void vl::DrawCall::setEnabled | ( | bool | enable ) | [inline] |
Definition at line 73 of file DrawCall.hpp.
References mEnabled.
| bool vl::DrawCall::isEnabled | ( | ) | const [inline] |
Definition at line 74 of file DrawCall.hpp.
References mEnabled.
Referenced by vl::Geometry::render_Implementation().
| virtual TriangleIterator vl::DrawCall::triangleIterator | ( | ) | const [pure 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.
Implemented in vl::DrawArrays, vl::DrawElements< Tgltype, arr_type >, vl::DrawRangeElements< index_type, Tgltype, arr_type >, vl::MultiDrawElements< Tgltype, arr_type >, vl::DrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLushort, GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawRangeElements< GLubyte, GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >, vl::MultiDrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::MultiDrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, and vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >.
Referenced by vl::Geometry::computeTangentSpace(), vl::EdgeExtractor::extractEdges(), vl::RayIntersector::intersectGeometry(), and vl::PolygonSimplifier::simplify().
| virtual IndexIterator vl::DrawCall::indexIterator | ( | ) | const [pure virtual] |
Returns a IndexIterator used to iterate through the virtual indices of a DrawCall.
This
Implemented in vl::DrawArrays, vl::DrawElements< Tgltype, arr_type >, vl::DrawRangeElements< index_type, Tgltype, arr_type >, vl::MultiDrawElements< Tgltype, arr_type >, vl::DrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLushort, GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::DrawRangeElements< GLubyte, GL_UNSIGNED_BYTE, ArrayUByte1 >, vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >, vl::MultiDrawElements< GL_UNSIGNED_SHORT, ArrayUShort1 >, vl::MultiDrawElements< GL_UNSIGNED_INT, ArrayUInt1 >, and vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >.
Referenced by vl::Geometry::computeBounds_Implementation(), and countIndices().
| int vl::DrawCall::countIndices | ( | ) | const [inline] |
Counts the number of virtual indices of a DrawCall.
Definition at line 86 of file DrawCall.hpp.
References indexIterator(), and vl::IndexIterator::isEnd().
| virtual int vl::DrawCall::instances | ( | ) | const [inline, virtual] |
Returns the number of instances for this set of primitives.
Reimplemented in vl::DrawArrays, and vl::DrawElementsBase.
Definition at line 95 of file DrawCall.hpp.
| void vl::DrawCall::setPatchParameter | ( | PatchParameter * | patch_param ) | [inline] |
Attach a PatchParameter to a DrawCall to be used when using primitive-type PT_PATCHES.
Definition at line 98 of file DrawCall.hpp.
References mPatchParameter.
| PatchParameter* vl::DrawCall::patchParameter | ( | ) | [inline] |
The PatchParameter attached to a DrawCall to be used when using primitive-type PT_PATCHES.
Definition at line 101 of file DrawCall.hpp.
References vl::ref< T >::get(), and mPatchParameter.
| const PatchParameter* vl::DrawCall::patchParameter | ( | ) | const [inline] |
The PatchParameter attached to a DrawCall to be used when using primitive-type PT_PATCHES.
Definition at line 104 of file DrawCall.hpp.
References vl::ref< T >::get(), and mPatchParameter.
| void vl::DrawCall::applyPatchParameters | ( | ) | const [inline, protected] |
Definition at line 107 of file DrawCall.hpp.
References mPatchParameter, mType, vl::PT_PATCHES, and vl::Log::warning().
Referenced by vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::render(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::render(), and vl::DrawArrays::render().
ref<PatchParameter> vl::DrawCall::mPatchParameter [protected] |
Definition at line 124 of file DrawCall.hpp.
Referenced by applyPatchParameters(), patchParameter(), and setPatchParameter().
EPrimitiveType vl::DrawCall::mType [protected] |
Definition at line 125 of file DrawCall.hpp.
Referenced by applyPatchParameters(), vl::DrawArrays::DrawArrays(), vl::DrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::DrawElements(), vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::DrawRangeElements(), vl::MultiDrawElements< GL_UNSIGNED_BYTE, ArrayUByte1 >::MultiDrawElements(), operator=(), primitiveType(), and setPrimitiveType().
bool vl::DrawCall::mEnabled [protected] |
Definition at line 126 of file DrawCall.hpp.
Referenced by isEnabled(), operator=(), and setEnabled().