Visualization Library v1.0.3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes

vl::DrawElementsBase Class Reference

Base interface for all DrawElements* sub classes. More...

#include <DrawElements.hpp>

Inheritance diagram for vl::DrawElementsBase:
vl::DrawCall vl::Object vl::DrawElements< ArrayUByte1 > vl::DrawElements< ArrayUInt1 > vl::DrawElements< ArrayUShort1 > vl::DrawElements< arr_type > vl::DrawElementsUByte vl::DrawElementsUInt vl::DrawElementsUShort

List of all members.

Public Member Functions

virtual bool primitiveRestartEnabled () const
 Returns whether the primitive-restart functionality is enabled or not (requires OpenGL 3.1).
void setPrimitiveRestartEnabled (bool enabled)
 Enables the primitive-restart functionality (requires OpenGL 3.1).
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
bool mPrimitiveRestartEnabled
GLuint mBaseVertex

Detailed Description

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.


Member Function Documentation

virtual bool vl::DrawElementsBase::primitiveRestartEnabled (  ) const [inline, virtual]

Returns whether the primitive-restart functionality is enabled or not (requires OpenGL 3.1).

See http://www.opengl.org/sdk/docs/man3/xhtml/glPrimitiveRestartIndex.xml

Reimplemented from vl::DrawCall.

Definition at line 59 of file DrawElements.hpp.

References mPrimitiveRestartEnabled.

Referenced by vl::VLXClassWrapper_DrawCall::exportDrawCall(), vl::DrawElements< ArrayUShort1 >::render(), and vl::DrawElements< ArrayUShort1 >::triangleIterator().

void vl::DrawElementsBase::setPrimitiveRestartEnabled ( bool  enabled ) [inline]

Enables the primitive-restart functionality (requires OpenGL 3.1).

See http://www.opengl.org/sdk/docs/man3/xhtml/glPrimitiveRestartIndex.xml

Definition at line 62 of file DrawElements.hpp.

References mPrimitiveRestartEnabled.

Referenced by vl::VLXClassWrapper_DrawCall::importDrawCall().

void vl::DrawElementsBase::setInstances ( int  instances ) [inline]

Sets the number of instances for this set of primitives.

Definition at line 65 of file DrawElements.hpp.

References instances(), and mInstances.

Referenced by vl::VLXClassWrapper_DrawCall::importDrawCall().

int vl::DrawElementsBase::instances (  ) const [inline, virtual]

Returns the number of instances for this set of primitives.

Reimplemented from vl::DrawCall.

Definition at line 68 of file DrawElements.hpp.

References mInstances.

Referenced by vl::DrawElements< ArrayUShort1 >::DrawElements(), vl::VLXClassWrapper_DrawCall::exportDrawCall(), vl::DrawElements< ArrayUShort1 >::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 74 of file DrawElements.hpp.

References mBaseVertex.

Referenced by vl::VLXClassWrapper_DrawCall::importDrawCall().

int vl::DrawElementsBase::baseVertex (  ) const [inline]

Member Data Documentation


The documentation for this class was generated from the following file:

Visualization Library v1.0.3 Reference Documentation
Copyright Michele Bosi. All rights reserved.
Updated on Tue Feb 7 2017 00:55:09.
Permission is granted to use this page to write and publish articles regarding Visualization Library.