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

Public Member Functions | |
| VertexAttributeMap () | |
| void | addMapping (const ID &attributeName, const ID &dataRegister) |
| ID | getMapping (const ID &dataRegister) const |
| void | removeMapping (const ID &dataRegister) |
| bool | registerIsUsed (const ID &dataRegister) const |
| Iterator< ID > * | newVertexAttributeNameIterator () const |
| Iterator< ID > * | newRegisterIterator () const |
| VRS_TYPEINFO (VertexAttributeMap, MonoAttribute) | |
| VRS_SERIALIZABLE (VertexAttributeMap) | |
Static Public Member Functions | |
| static VertexAttributeMap * | newStandardMapping () |
| VRS::VertexAttributeMap::VertexAttributeMap | ( | ) |
Vertices can be extended with user defined vertex data e.g. tangents or light direction vectors. Additional data, that has such an abstract name, must be mapped to data of which the hardware register is known for rendering. This attribute provides such a flexibel mapping from identifier for abstract data to vertex registers.
'attributeNames', that must be registered first, uniformly indicate user-defined vertex data types. Some predefined attibute names are given, e.g. 'TANGENT_ID()' and further names can be defined by applications. 'dataRegister' indicated registers data storage that is possibly linked to a register provided by graphics hardware. These are given with the painter interface. Also, the hardware specific painter interprets vertex attribute mappings. Unused hardware registers are not used for rendering; those can be used to store vertex data without the requirement to render them.
As an example, tangents can be transfered as texture coords to graphics hardware to be interpolated by the rasterizer. Then, interpolants result in fragments to be processed next.
Adds a new vertex attribute mapping. The attribute name belongs to the user-defined vertex attrbute and the data register name is an identifier indicating the data type which is linked to the register to be used for the user-defined vertex data. One hardware register can be only assigned to one vertex data name, old vertex data names will be overwritten. On the other hand, the same vertex data name can be mapped to different hardware registers.
gets the vertex data type identifier that is mapped to the given register identifier. Asserts if a mapping to the register does not exist.
| void VRS::VertexAttributeMap::removeMapping | ( | const ID & | dataRegister | ) |
Removes the vertex attribute mapping that maps data to the given register identifier.
| bool VRS::VertexAttributeMap::registerIsUsed | ( | const ID & | dataRegister | ) | const |
Checks if a register is already used.
Accessing all vertex attribute names provided.
Accessing all register identifiers provided.
| static VertexAttributeMap* VRS::VertexAttributeMap::newStandardMapping | ( | ) | [static] |
Returns a new instance containing the following standard mappings: VERTEX, NORMAL, COLOR, SECONDARY_COLOR, FOG_COORD, EDGE_FLAG, VERTEX_WEIGHT, TEX_COORD_0 The mappings returned may be modified or extended.
| VRS::VertexAttributeMap::VRS_TYPEINFO | ( | VertexAttributeMap | , | |
| MonoAttribute | ||||
| ) |
| VRS::VertexAttributeMap::VRS_SERIALIZABLE | ( | VertexAttributeMap | ) |