Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
Wraps the OpenGL function glDrawArrays(). More...
#include <DrawArrays.hpp>
Public Member Functions | |
| DrawArrays () | |
| DrawArrays (EPrimitiveType primitive, int start, int count, int instances=1) | |
| virtual const char * | className () |
| Returns the name of the class. | |
| DrawArrays & | operator= (const DrawArrays &other) |
| virtual ref< DrawCall > | clone () const |
| virtual void | deleteVBOs () |
| virtual void | updateVBOs (bool, bool) |
| virtual unsigned int | handle () const |
| virtual void | render (bool) const |
| void | setStart (int start) |
| sets the starting vertex for the rendering. | |
| int | start () const |
| returns the starting vertex for the rendering. | |
| void | setCount (int count) |
| sets the number of vertices to be rendered. | |
| int | count () const |
| returns the number of vertices to be rendered. | |
| 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. | |
| TriangleIterator | triangleIterator () const |
| Returns a TriangleIterator used to iterate through the triangles of a DrawCall. | |
| IndexIterator | indexIterator () const |
| Returns a IndexIterator used to iterate through the virtual indices of a DrawCall. | |
Protected Attributes | |
| int | mStart |
| int | mCount |
| int | mInstances |
Wraps the OpenGL function glDrawArrays().
See also http://www.opengl.org/sdk/docs/man/xhtml/glDrawArrays.xml for more information.
DrawElements, MultiDrawElements, DrawRangeElements, DrawArrays are used by Geometry to define a set of primitives to be rendered, see Geometry::drawCalls().
Definition at line 49 of file DrawArrays.hpp.
| vl::DrawArrays::DrawArrays | ( | ) | [inline] |
Definition at line 52 of file DrawArrays.hpp.
References mInstances, vl::DrawCall::mType, vl::PT_TRIANGLES, and VL_DEBUG_SET_OBJECT_NAME.
Referenced by clone().
| vl::DrawArrays::DrawArrays | ( | EPrimitiveType | primitive, |
| int | start, | ||
| int | count, | ||
| int | instances = 1 |
||
| ) | [inline] |
Definition at line 58 of file DrawArrays.hpp.
References instances(), mInstances, vl::DrawCall::mType, and VL_DEBUG_SET_OBJECT_NAME.
| virtual const char* vl::DrawArrays::className | ( | ) | [inline, virtual] |
Returns the name of the class.
Reimplemented from vl::DrawCall.
Definition at line 65 of file DrawArrays.hpp.
| DrawArrays& vl::DrawArrays::operator= | ( | const DrawArrays & | other ) | [inline] |
Definition at line 67 of file DrawArrays.hpp.
References mCount, mInstances, and mStart.
Implements vl::DrawCall.
Definition at line 76 of file DrawArrays.hpp.
References count(), DrawArrays(), instances(), vl::DrawCall::primitiveType(), and start().
| virtual void vl::DrawArrays::deleteVBOs | ( | ) | [inline, virtual] |
Implements vl::DrawCall.
Definition at line 81 of file DrawArrays.hpp.
| virtual void vl::DrawArrays::updateVBOs | ( | bool | , |
| bool | |||
| ) | [inline, virtual] |
Implements vl::DrawCall.
Definition at line 82 of file DrawArrays.hpp.
| virtual unsigned int vl::DrawArrays::handle | ( | ) | const [inline, virtual] |
Implements vl::DrawCall.
Definition at line 83 of file DrawArrays.hpp.
| virtual void vl::DrawArrays::render | ( | bool | ) | const [inline, virtual] |
Implements vl::DrawCall.
Definition at line 85 of file DrawArrays.hpp.
References vl::DrawCall::applyPatchParameters(), count(), vl::Log::error(), instances(), vl::DrawCall::primitiveType(), vl::Log::print(), start(), vl::VL_glDrawArraysInstanced(), and VL_TRAP.
| void vl::DrawArrays::setStart | ( | int | start ) | [inline] |
sets the starting vertex for the rendering.
Definition at line 111 of file DrawArrays.hpp.
| int vl::DrawArrays::start | ( | ) | const [inline] |
returns the starting vertex for the rendering.
Definition at line 114 of file DrawArrays.hpp.
References mStart.
Referenced by clone(), render(), and setStart().
| void vl::DrawArrays::setCount | ( | int | count ) | [inline] |
sets the number of vertices to be rendered.
Definition at line 117 of file DrawArrays.hpp.
| int vl::DrawArrays::count | ( | ) | const [inline] |
returns the number of vertices to be rendered.
Definition at line 120 of file DrawArrays.hpp.
References mCount.
Referenced by clone(), render(), and setCount().
| void vl::DrawArrays::setInstances | ( | int | instances ) | [inline] |
Sets the number of instances for this set of primitives.
Definition at line 123 of file DrawArrays.hpp.
References instances(), and mInstances.
| int vl::DrawArrays::instances | ( | ) | const [inline, virtual] |
Returns the number of instances for this set of primitives.
Reimplemented from vl::DrawCall.
Definition at line 126 of file DrawArrays.hpp.
References mInstances.
Referenced by clone(), DrawArrays(), render(), and setInstances().
| TriangleIterator vl::DrawArrays::triangleIterator | ( | ) | const [inline, 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.
Implements vl::DrawCall.
Definition at line 128 of file DrawArrays.hpp.
References vl::ref< T >::get(), mCount, mStart, and vl::DrawCall::primitiveType().
| IndexIterator vl::DrawArrays::indexIterator | ( | ) | const [inline, virtual] |
Returns a IndexIterator used to iterate through the virtual indices of a DrawCall.
This
Implements vl::DrawCall.
Definition at line 135 of file DrawArrays.hpp.
References vl::ref< T >::get(), vl::IndexIterator::initialize(), mCount, and mStart.
int vl::DrawArrays::mStart [protected] |
Definition at line 145 of file DrawArrays.hpp.
Referenced by indexIterator(), operator=(), setStart(), start(), and triangleIterator().
int vl::DrawArrays::mCount [protected] |
Definition at line 146 of file DrawArrays.hpp.
Referenced by count(), indexIterator(), operator=(), setCount(), and triangleIterator().
int vl::DrawArrays::mInstances [protected] |
Definition at line 147 of file DrawArrays.hpp.
Referenced by DrawArrays(), instances(), operator=(), and setInstances().