| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/opengl/mappedvertexattributedatagl.h>

Public Member Functions | |
| MappedVertexAttributeDataGL (const PolygonSet *source, BufferObjectGL::UsagePattern usage=BufferObjectGL::STATIC_DRAW) | |
| MappedVertexAttributeDataGL (BaseVertexAttributeBufferObjectGL *vertices=NULL, BaseVertexAttributeBufferObjectGL *normals=NULL, BaseVertexAttributeBufferObjectGL *color=NULL, BaseVertexAttributeBufferObjectGL *tex_coord_0=NULL) | |
| BaseVertexAttributeBufferObjectGL * | getBufferObject (const ID &vertexAttributeName) const |
| void | setBufferObject (const ID &vertexAttributeName, BaseVertexAttributeBufferObjectGL *content) |
| Set and get per-vertex values for a vertex attribute name. | |
| SO< Dictionary< ID, SO < BaseVertexAttributeBufferObjectGL > > > | getBufferObjects () const |
| Returns the dictionary with all contained buffer objects. | |
| void | clear () |
| Throws away all internal data, resulting in an empty object. | |
| UINT | usedMemory () const |
| VRS_TYPEINFO (MappedVertexAttributeDataGL, MonoAttribute) | |
| VRS_SERIALIZABLE (MappedVertexAttributeDataGL) | |
| VRS::MappedVertexAttributeDataGL::MappedVertexAttributeDataGL | ( | const PolygonSet * | source, | |
| BufferObjectGL::UsagePattern | usage = BufferObjectGL::STATIC_DRAW | |||
| ) |
Creates a mapped vertex attribute data from a given polygon set 'source', which must not be NULL. For the usage parameter see "bufferobjectgl.h". The data of 'source' is copied into buffers objects. For efficiency the data is stored in the following form: > vector data: 3-tuple of floats > color data: 4-tuple of unsigned char
| VRS::MappedVertexAttributeDataGL::MappedVertexAttributeDataGL | ( | BaseVertexAttributeBufferObjectGL * | vertices = NULL, |
|
| BaseVertexAttributeBufferObjectGL * | normals = NULL, |
|||
| BaseVertexAttributeBufferObjectGL * | color = NULL, |
|||
| BaseVertexAttributeBufferObjectGL * | tex_coord_0 = NULL | |||
| ) |
The attribute stores per-vertex values for user-defined vertex attribute names. These names are independent from the underlying OpenGL graphics hardware Due to the mapping provided by the MonoAttribute 'VertexAttributeMap' per-vertex values will be mapped to target data resp. OpenGL registers. Per-vertex values for common names can be added using the constructor. To extend the set of vertex attribute names registrate a new vertex attribute names (see VertexAtributeMap).
Note: If no mapping is available for a vertex name no vertex data will be transfered to graphics hardware. Also, if the target register is not supported by the painter no transfer will be appied.
| BaseVertexAttributeBufferObjectGL* VRS::MappedVertexAttributeDataGL::getBufferObject | ( | const ID & | vertexAttributeName | ) | const |
| void VRS::MappedVertexAttributeDataGL::setBufferObject | ( | const ID & | vertexAttributeName, | |
| BaseVertexAttributeBufferObjectGL * | content | |||
| ) |
Set and get per-vertex values for a vertex attribute name.
| SO<Dictionary<ID, SO<BaseVertexAttributeBufferObjectGL> > > VRS::MappedVertexAttributeDataGL::getBufferObjects | ( | ) | const |
Returns the dictionary with all contained buffer objects.
| void VRS::MappedVertexAttributeDataGL::clear | ( | ) |
Throws away all internal data, resulting in an empty object.
Note that it is faster to use clear an existing MappedVertexAttributeShapeGL-object than to instantiate a new MappedVertexAttributeShapeGL-object and destruct the old one
| UINT VRS::MappedVertexAttributeDataGL::usedMemory | ( | ) | const |
Returns the sum of bytes allocated by all buffer objects belonging to this vertex attribute set.
| VRS::MappedVertexAttributeDataGL::VRS_TYPEINFO | ( | MappedVertexAttributeDataGL | , | |
| MonoAttribute | ||||
| ) |
| VRS::MappedVertexAttributeDataGL::VRS_SERIALIZABLE | ( | MappedVertexAttributeDataGL | ) |