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:

vl::Primitives vl::Object

List of all members.

Public Member Functions

 DrawArrays ()
 DrawArrays (EPrimitiveType primitive, int start, size_t count, size_t instances=1)
virtual const char * className ()
 Returns the name of the class.
virtual ref< Primitivesclone () const
virtual void deleteVBOs ()
virtual void updateVBOs (bool)
virtual unsigned int handle () const
virtual size_t indexCount () const
virtual size_t index (int i) const
size_t triangleCount () const
size_t lineCount () const
size_t pointCount () const
virtual void render (bool) const
void setStart (size_t start)
 sets the starting vertex for the rendering.
size_t start () const
 returns the starting vertex for the rendering.
void setCount (size_t count)
 sets the number of vertices to be rendered.
size_t count () const
 returns the number of vertices to be rendered.

Protected Attributes

size_t mStart
size_t 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,
size_t  count,
size_t  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 size_t vl::DrawArrays::indexCount (  )  const [inline, virtual]

Implements vl::Primitives.

virtual size_t vl::DrawArrays::index ( int  i  )  const [inline, virtual]

Implements vl::Primitives.

size_t vl::DrawArrays::triangleCount (  )  const [inline, virtual]

Implements vl::Primitives.

size_t vl::DrawArrays::lineCount (  )  const [inline, virtual]

Implements vl::Primitives.

size_t 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 ( size_t  start  )  [inline]

sets the starting vertex for the rendering.

size_t vl::DrawArrays::start (  )  const [inline]

returns the starting vertex for the rendering.

void vl::DrawArrays::setCount ( size_t  count  )  [inline]

sets the number of vertices to be rendered.

size_t vl::DrawArrays::count (  )  const [inline]

returns the number of vertices to be rendered.


Member Data Documentation

size_t vl::DrawArrays::mStart [protected]

size_t vl::DrawArrays::mCount [protected]


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

Visualization Library v2009.08 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Tue Dec 29 13:56:54 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.