# Visualization Library

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

[Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::DrawArrays Class Reference

Wraps the OpenGL function glDrawArrays(), see also http://www.opengl.org/sdk/docs/man/xhtml/glDrawArrays.xml for more information. More...

`#include <DrawArrays.hpp>`

Inheritance diagram for vl::DrawArrays:

List of all members.

## Public Member Functions

| DrawArrays ()
| DrawArrays (EPrimitiveType primitive, int start, int count, int instances=1)
virtual const char * | className ()
| Returns the name of the class.
virtual ref< Primitives > | clone () const
virtual void | deleteVBOs ()
virtual void | updateVBOs (bool)
virtual unsigned int | handle () const
virtual unsigned int | indexCount () const
virtual unsigned int | index (int i) const
int | triangleCount () const
int | lineCount () const
int | pointCount () 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.

## Protected Attributes

int | mStart
int | mCount

## Detailed Description

Wraps the OpenGL function glDrawArrays(), see also http://www.opengl.org/sdk/docs/man/xhtml/glDrawArrays.xml for more information.

DrawArrays and DrawElements are used by Geometry to define a set of primitives to be rendered (Geometry::primitives()). DrawArrays and DrawElements supports all the OpenGL primitive types. Geometry multi instancing is also supported, see the functions setInstances() and instances().

## Constructor & Destructor Documentation

vl::DrawArrays::DrawArrays | ( |  | ) | `[inline]`

vl::DrawArrays::DrawArrays | ( | EPrimitiveType | primitive,
|  | int | start,
|  | int | count,
|  | int | instances = `1` |
| ) |  |  | `[inline]`

## Member Function Documentation

virtual const char* vl::DrawArrays::className | ( |  | ) | `[inline, virtual]`

Returns the name of the class.

Reimplemented from vl::Primitives.

virtual ref<Primitives> vl::DrawArrays::clone | ( |  | ) | const`[inline, virtual]`

Implements vl::Primitives.

virtual void vl::DrawArrays::deleteVBOs | ( |  | ) | `[inline, virtual]`

Implements vl::Primitives.

virtual void vl::DrawArrays::updateVBOs | ( | bool |  | ) | `[inline, virtual]`

Implements vl::Primitives.

virtual unsigned int vl::DrawArrays::handle | ( |  | ) | const`[inline, virtual]`

Implements vl::Primitives.

virtual unsigned int vl::DrawArrays::indexCount | ( |  | ) | const`[inline, virtual]`

Implements vl::Primitives.

virtual unsigned int vl::DrawArrays::index | ( | int | i | ) | const`[inline, virtual]`

Implements vl::Primitives.

int vl::DrawArrays::triangleCount | ( |  | ) | const`[inline, virtual]`

Implements vl::Primitives.

int vl::DrawArrays::lineCount | ( |  | ) | const`[inline, virtual]`

Implements vl::Primitives.

int vl::DrawArrays::pointCount | ( |  | ) | const`[inline, virtual]`

Implements vl::Primitives.

virtual void vl::DrawArrays::render | ( | bool |  | ) | const`[inline, virtual]`

Implements vl::Primitives.

void vl::DrawArrays::setStart | ( | int | start | ) | `[inline]`

sets the starting vertex for the rendering.

int vl::DrawArrays::start | ( |  | ) | const`[inline]`

returns the starting vertex for the rendering.

void vl::DrawArrays::setCount | ( | int | count | ) | `[inline]`

sets the number of vertices to be rendered.

int vl::DrawArrays::count | ( |  | ) | const`[inline]`

returns the number of vertices to be rendered.

## Member Data Documentation

int vl::DrawArrays::mStart`[protected]`

int vl::DrawArrays::mCount`[protected]`

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

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/DrawArrays.hpp

Visualization Library v2009.07 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Mon Aug 10 21:41:34 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.