Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes

vl::DrawRangeElementsBase Class Reference

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

#include <DrawRangeElements.hpp>

Inheritance diagram for vl::DrawRangeElementsBase:
vl::DrawCall vl::Object vl::DrawRangeElements< GLubyte, GL_UNSIGNED_BYTE, ArrayUByte1 > vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 > vl::DrawRangeElements< GLushort, GL_UNSIGNED_SHORT, ArrayUShort1 > vl::DrawRangeElements< index_type, Tgltype, arr_type > vl::DrawRangeElementsUByte vl::DrawRangeElementsUInt vl::DrawRangeElementsUShort

List of all members.

Public Member Functions

void setRangeStart (int rstart)
 Sets the range start.
int rangeStart () const
 Returns the range start.
void setRangeEnd (int rend)
 Sets the range end.
int rangeEnd () const
 Returns the range end.
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 setBaseVertex (int base_vertex)
 If base_vertx is != 0 glDrawRangeElementsBaseVertex/glDrawRangeElementsInstancedBaseVertex will be used instead of their non *BaseVertx counterparts.
int baseVertex () const
 Returns the currently used base vertex.

Protected Attributes

int mRangeStart
int mRangeEnd
int mBaseVertex
GLuint mPrimitiveRestartIndex
bool mPrimitiveRestartEnabled

Detailed Description

Base interface for all DrawRangeElements* sub classes.

Implements the index-type-independent interface of the class. That is you can cast to DrawRangeElementsBase* and access its members without needing to know whether the actual class is a vl::DrawRangeElementsUInt, vl::DrawRangeElementsUShort or vl::DrawRangeElementsUByte.

Definition at line 53 of file DrawRangeElements.hpp.


Member Function Documentation

void vl::DrawRangeElementsBase::setRangeStart ( int  rstart ) [inline]

Sets the range start.

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

Definition at line 57 of file DrawRangeElements.hpp.

References mRangeStart.

int vl::DrawRangeElementsBase::rangeStart (  ) const [inline]

Returns the range start.

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

Definition at line 60 of file DrawRangeElements.hpp.

References mRangeStart.

void vl::DrawRangeElementsBase::setRangeEnd ( int  rend ) [inline]

Sets the range end.

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

Definition at line 63 of file DrawRangeElements.hpp.

References mRangeEnd.

int vl::DrawRangeElementsBase::rangeEnd (  ) const [inline]

Returns the range end.

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

Definition at line 66 of file DrawRangeElements.hpp.

References mRangeEnd.

GLuint vl::DrawRangeElementsBase::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 70 of file DrawRangeElements.hpp.

References mPrimitiveRestartIndex.

Referenced by vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::render(), and vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::triangleIterator().

void vl::DrawRangeElementsBase::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 74 of file DrawRangeElements.hpp.

References mPrimitiveRestartIndex.

bool vl::DrawRangeElementsBase::primitiveRestartEnabled (  ) const [inline]
void vl::DrawRangeElementsBase::setPrimitiveRestartEnabled ( bool  enabled ) [inline]

Enables the primitive-restart functionality.

See http://www.opengl.org/registry/specs/NV/primitive_restart.txt

Definition at line 80 of file DrawRangeElements.hpp.

References mPrimitiveRestartEnabled.

void vl::DrawRangeElementsBase::setBaseVertex ( int  base_vertex ) [inline]

If base_vertx is != 0 glDrawRangeElementsBaseVertex/glDrawRangeElementsInstancedBaseVertex 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/glDrawRangeElementsBaseVertex.xml

Definition at line 86 of file DrawRangeElements.hpp.

References mBaseVertex.

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

Returns the currently used base vertex.

For more information see also http://www.opengl.org/sdk/docs/man3/xhtml/glDrawRangeElementsBaseVertex.xml

Definition at line 90 of file DrawRangeElements.hpp.

References mBaseVertex.

Referenced by vl::DrawRangeElements< GLuint, GL_UNSIGNED_INT, ArrayUInt1 >::triangleIterator().


Member Data Documentation


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

Visualization Library v2011.05.1142 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu May 26 2011 22:51:39.
Permission is granted to use this page to write and publish articles regarding Visualization Library.