Visualization Library

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

vl::DrawArrays Class Reference

Wraps the OpenGL function glDrawArrays(). More...

#include <DrawArrays.hpp>

Inheritance diagram for vl::DrawArrays:
vl::DrawCall vl::Object

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.
DrawArraysoperator= (const DrawArrays &other)
virtual ref< DrawCallclone () 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

Detailed Description

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().

See also:
DrawCall, DrawElements, MultiDrawElements, DrawRangeElements, Geometry, Actor

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::DrawCall.

DrawArrays& vl::DrawArrays::operator= ( const DrawArrays other ) [inline]
virtual ref<DrawCall> vl::DrawArrays::clone (  ) const [inline, virtual]

Implements vl::DrawCall.

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

Implements vl::DrawCall.

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

Implements vl::DrawCall.

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

Implements vl::DrawCall.

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

Implements vl::DrawCall.

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.

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

Sets the number of instances for this set of primitives.

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

Returns the number of instances for this set of primitives.

Reimplemented from vl::DrawCall.

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.

IndexIterator vl::DrawArrays::indexIterator (  ) const [inline, virtual]

Returns a IndexIterator used to iterate through the virtual indices of a DrawCall.

This

Note:
The returned indices already take into account primitive restart and base vertex.

Implements vl::DrawCall.


Member Data Documentation

int vl::DrawArrays::mStart [protected]
int vl::DrawArrays::mCount [protected]
int vl::DrawArrays::mInstances [protected]

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

Visualization Library v2010.11.1125 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Fri Nov 26 2010 03:13:30.
Permission is granted to use this page to write and publish articles regarding Visualization Library.