# Visualization Library

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

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

Public Member Functions | Protected Attributes

# vl::VertexAttribInfo Class Reference

Implements a generic OpenGL Shading Language vertex attribute to be used with a Geometry, see also http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribPointer.xml. More...

`#include <VertexAttribInfo.hpp>`

Inheritance diagram for vl::VertexAttribInfo:

List of all members.

## Public Member Functions

virtual const char * | className ()
| Returns the name of the class.
| VertexAttribInfo (unsigned int location, ArrayAbstract *data, bool normalize=true, EVertexAttribBehavior data_behav=VAB_NORMAL)
| VertexAttribInfo ()
ArrayAbstract * | data () const
| The GPU buffer that stores the data.
unsigned int | attribIndex () const
| The 'index' parameter of the vertex attribute as used with glVertexAttribPointer() and glEnableVertexAttribArray().
bool | normalize () const
| The 'normalized' parameter as used with glVertexAttribPointer()
void | setDataBehavior (EVertexAttribBehavior behavior)
| How the data is interpreted by the OpenGL, see EVertexAttribBehavior.
EVertexAttribBehavior | dataBehavior () const
| How the data is interpreted by the OpenGL, see EVertexAttribBehavior.
void | setData (ArrayAbstract *data)
| The GPU buffer that stores the data.
void | setAttribIndex (unsigned int index)
| The 'index' parameter of the vertex attribute as used with glVertexAttribPointer() and glEnableVertexAttribArray().
void | setNormalize (bool normalize)
| The 'normalized' parameter as used with glVertexAttribPointer()

## Protected Attributes

ref< ArrayAbstract > | mData
unsigned int | mAttribIndex
EVertexAttribBehavior | mDataBehavior
bool | mNormalize

## Detailed Description

Implements a generic OpenGL Shading Language vertex attribute to be used with a Geometry, see also http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribPointer.xml.

Definition at line 47 of file VertexAttribInfo.hpp.

## Constructor & Destructor Documentation

vl::VertexAttribInfo::VertexAttribInfo | ( | unsigned int | location,
|  | ArrayAbstract * | data,
|  | bool | normalize = `true`,
|  | EVertexAttribBehavior | data_behav = `VAB_NORMAL`
| ) |  | `[inline]`

Definition at line 52 of file VertexAttribInfo.hpp.

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

Definition at line 54 of file VertexAttribInfo.hpp.

## Member Function Documentation

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

Returns the name of the class.

Reimplemented from vl::Object.

Definition at line 50 of file VertexAttribInfo.hpp.

ArrayAbstract* vl::VertexAttribInfo::data | ( | ) | const`[inline]`

The GPU buffer that stores the data.

Definition at line 57 of file VertexAttribInfo.hpp.

References vl::ref< T >::get(), and mData.

Referenced by vl::OpenGLContext::bindVAS(), vl::Geometry::computeBounds_Implementation(), vl::Geometry::deleteVBOs(), setData(), vl::Geometry::updateVBOs(), and vl::Geometry::vertexAttrib().

unsigned int vl::VertexAttribInfo::attribIndex | ( | ) | const`[inline]`

The 'index' parameter of the vertex attribute as used with glVertexAttribPointer() and glEnableVertexAttribArray().

See also:
  - http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribPointer.xml
  - http://www.opengl.org/sdk/docs/man/xhtml/glEnableVertexAttribArray.xml

Definition at line 63 of file VertexAttribInfo.hpp.

References mAttribIndex.

Referenced by vl::OpenGLContext::bindVAS(), vl::Geometry::eraseVertexAttrib(), vl::Geometry::setVertexAttribArray(), and vl::Geometry::vertexAttribInfo().

bool vl::VertexAttribInfo::normalize | ( | ) | const`[inline]`

The 'normalized' parameter as used with glVertexAttribPointer()

See also:
  - http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribPointer.xml

Definition at line 68 of file VertexAttribInfo.hpp.

References mNormalize.

Referenced by vl::OpenGLContext::bindVAS(), and setNormalize().

void vl::VertexAttribInfo::setDataBehavior | ( | EVertexAttribBehavior | behavior ) | `[inline]`

How the data is interpreted by the OpenGL, see EVertexAttribBehavior.

Definition at line 71 of file VertexAttribInfo.hpp.

References mDataBehavior.

EVertexAttribBehavior vl::VertexAttribInfo::dataBehavior | ( | ) | const`[inline]`

How the data is interpreted by the OpenGL, see EVertexAttribBehavior.

Definition at line 74 of file VertexAttribInfo.hpp.

References mDataBehavior.

Referenced by vl::OpenGLContext::bindVAS().

void vl::VertexAttribInfo::setData | ( | ArrayAbstract * | data ) | `[inline]`

The GPU buffer that stores the data.

Definition at line 77 of file VertexAttribInfo.hpp.

References data(), and mData.

Referenced by vl::Geometry::regenerateVertices().

void vl::VertexAttribInfo::setAttribIndex | ( | unsigned int | index ) | `[inline]`

The 'index' parameter of the vertex attribute as used with glVertexAttribPointer() and glEnableVertexAttribArray().

See also:
  - http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribPointer.xml
  - http://www.opengl.org/sdk/docs/man/xhtml/glEnableVertexAttribArray.xml

Definition at line 83 of file VertexAttribInfo.hpp.

References mAttribIndex.

void vl::VertexAttribInfo::setNormalize | ( | bool | normalize ) | `[inline]`

The 'normalized' parameter as used with glVertexAttribPointer()

See also:
  - http://www.opengl.org/sdk/docs/man/xhtml/glVertexAttribPointer.xml

Definition at line 88 of file VertexAttribInfo.hpp.

References mNormalize, and normalize().

## Member Data Documentation

ref<ArrayAbstract> vl::VertexAttribInfo::mData`[protected]`

Definition at line 91 of file VertexAttribInfo.hpp.

Referenced by data(), and setData().

unsigned int vl::VertexAttribInfo::mAttribIndex`[protected]`

Definition at line 92 of file VertexAttribInfo.hpp.

Referenced by attribIndex(), and setAttribIndex().

EVertexAttribBehavior vl::VertexAttribInfo::mDataBehavior`[protected]`

Definition at line 93 of file VertexAttribInfo.hpp.

Referenced by dataBehavior(), and setDataBehavior().

bool vl::VertexAttribInfo::mNormalize`[protected]`

Definition at line 94 of file VertexAttribInfo.hpp.

Referenced by normalize(), and setNormalize().

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

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlGraphics/VertexAttribInfo.hpp

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