#include <Vertexbuffer.h>

Public Member Functions | |
| Vertexbuffer (void) | |
| brief create a Vertexbuffer with xml specification | |
| ~Vertexbuffer (void) | |
| virtual void | createProperties (void) |
| virtual const string | getTypeName (bool ofComponent=false) const |
| virtual void | onInitialize (void) |
| virtual void | onRender (void) |
| bool | getDirectRendering (void) const |
| bool | getUseProgram (void) const |
| GLenum | getUsage (void) const |
| GLenum | getMode (void) const |
| GLuint | getNumVertices (void) const |
| void | setUsage (GLenum usage) |
| void | setMode (GLenum mode) |
| void | setNumVertices (GLuint numVertices) |
| void | setDirectRendering (bool state=true) |
| void | setUseProgram (bool state=true) |
| void | setVertexAttribute (GLuint vertexIndex, const string attribName, const GLfloat *data) |
| sets an attribute by name | |
| void | setVertexAttribute (GLuint vertexIndex, GLuint attribIndex, const GLfloat *data) |
| sets an attribute by index | |
| void | addAttribute (GLuint numFloats, const string name) |
| adds (and not sets) a new attribute to the layout | |
| GLuint | getNumAttributes (void) |
| GLuint | getVertexSize (void) |
| const vector< GLuint > & | getAttributeSizes (void) |
| const vector< GLuint > & | getAttributeOffsets (void) |
| const vector< string > & | getAttributeNames (void) |
Static Public Member Functions | |
| static PropertyPtr | create (const XMLNodePtr &xml=XMLNodePtr()) |
Definition at line 11 of file Vertexbuffer.h.
| RenderTools::Vertexbuffer::Vertexbuffer | ( | void | ) |
| RenderTools::Vertexbuffer::~Vertexbuffer | ( | void | ) |
Definition at line 109 of file Vertexbuffer.cpp.
| void RenderTools::Vertexbuffer::addAttribute | ( | GLuint | numFloats, | |
| const string | name | |||
| ) |
adds (and not sets) a new attribute to the layout
increase the number of attributes
add the data-offset of this attribute
add 1 block of numFloats
push the name of the attribute
increase total size
if initialized reallocate
Definition at line 125 of file Vertexbuffer.cpp.
| PropertyPtr RenderTools::Vertexbuffer::create | ( | const XMLNodePtr & | xml = XMLNodePtr() |
) | [static] |
Definition at line 23 of file Vertexbuffer.cpp.
| void RenderTools::Vertexbuffer::createProperties | ( | void | ) | [virtual] |
based on the GL, add the names to the possible enumerants
Reimplemented from RenderTools::AbstractPropertyContainer.
Definition at line 31 of file Vertexbuffer.cpp.
| const vector< string > & RenderTools::Vertexbuffer::getAttributeNames | ( | void | ) |
Definition at line 160 of file Vertexbuffer.cpp.
| const vector< GLuint > & RenderTools::Vertexbuffer::getAttributeOffsets | ( | void | ) |
Definition at line 152 of file Vertexbuffer.cpp.
| const vector< GLuint > & RenderTools::Vertexbuffer::getAttributeSizes | ( | void | ) |
Definition at line 156 of file Vertexbuffer.cpp.
| bool RenderTools::Vertexbuffer::getDirectRendering | ( | void | ) | const |
Definition at line 196 of file Vertexbuffer.cpp.
| GLenum RenderTools::Vertexbuffer::getMode | ( | void | ) | const |
Definition at line 168 of file Vertexbuffer.cpp.
| GLuint RenderTools::Vertexbuffer::getNumAttributes | ( | void | ) |
Definition at line 144 of file Vertexbuffer.cpp.
| GLuint RenderTools::Vertexbuffer::getNumVertices | ( | void | ) | const |
Definition at line 172 of file Vertexbuffer.cpp.
| const string RenderTools::Vertexbuffer::getTypeName | ( | bool | ofComponent = false |
) | const [virtual] |
| GLenum RenderTools::Vertexbuffer::getUsage | ( | void | ) | const |
Definition at line 164 of file Vertexbuffer.cpp.
| bool RenderTools::Vertexbuffer::getUseProgram | ( | void | ) | const |
Definition at line 212 of file Vertexbuffer.cpp.
| GLuint RenderTools::Vertexbuffer::getVertexSize | ( | void | ) |
Definition at line 148 of file Vertexbuffer.cpp.
| void RenderTools::Vertexbuffer::onInitialize | ( | void | ) | [virtual] |
Reimplemented from RenderTools::AbstractPropertyContainer.
Definition at line 115 of file Vertexbuffer.cpp.
| void RenderTools::Vertexbuffer::onRender | ( | void | ) | [virtual] |
TODO: GL_ELEMENT_ARRAY_BUFFER
bind the used arrays to the attributes in the program
Implements RenderTools::RenderInterface.
Definition at line 261 of file Vertexbuffer.cpp.
| void RenderTools::Vertexbuffer::setDirectRendering | ( | bool | state = true |
) |
Definition at line 200 of file Vertexbuffer.cpp.
| void RenderTools::Vertexbuffer::setMode | ( | GLenum | mode | ) |
Definition at line 180 of file Vertexbuffer.cpp.
| void RenderTools::Vertexbuffer::setNumVertices | ( | GLuint | numVertices | ) |
Definition at line 184 of file Vertexbuffer.cpp.
| void RenderTools::Vertexbuffer::setUsage | ( | GLenum | usage | ) |
Definition at line 176 of file Vertexbuffer.cpp.
| void RenderTools::Vertexbuffer::setUseProgram | ( | bool | state = true |
) |
Definition at line 216 of file Vertexbuffer.cpp.
| void RenderTools::Vertexbuffer::setVertexAttribute | ( | GLuint | vertexIndex, | |
| GLuint | attribIndex, | |||
| const GLfloat * | data | |||
| ) |
sets an attribute by index
copy the data to the appropriate location in the buffer
Definition at line 231 of file Vertexbuffer.cpp.
| void RenderTools::Vertexbuffer::setVertexAttribute | ( | GLuint | vertexIndex, | |
| const string | attribName, | |||
| const GLfloat * | data | |||
| ) |
1.5.8