List of all members.
Detailed Description
This is the universal vertex format. This can be used particular when using shader programs.
Constructor & Destructor Documentation
sp::video::VertexFormatUniversal::VertexFormatUniversal |
( |
|
) |
|
sp::video::VertexFormatUniversal::~VertexFormatUniversal |
( |
|
) |
|
Member Function Documentation
void sp::video::VertexFormatUniversal::addBinormal |
( |
const ERendererDataTypes |
Type = DATATYPE_FLOAT |
) |
|
Adds the binormal vector component to the vertex format. The size is always 3. This feature is only supported with Direct3D11. For other renderers add a universal component.
void sp::video::VertexFormatUniversal::addColor |
( |
const ERendererDataTypes |
Type = DATATYPE_UNSIGNED_BYTE , |
|
|
s32 |
Size = 4 | |
|
) |
| | |
Adds the color componetn to the vertex format. For Direct3D9 this is always 4 ubytes (in the order ARGB).
- Parameters:
-
| Size,: | Valid numbers are: 3 -> RGB and 4 -> RGBA. By default 4. |
void sp::video::VertexFormatUniversal::addCoord |
( |
const ERendererDataTypes |
Type = DATATYPE_FLOAT , |
|
|
s32 |
Size = 3 | |
|
) |
| | |
Adds the coordinate component to the vertex format with the specified attributes.
- Parameters:
-
| Type,: | Specifies the data type (float, int etc.). |
| Size,: | Specifies the data size. Valid numbers are: 1 -> X, 2 -> XY, 3 -> XYZ and 4 -> XYZW. By default 3. |
- Returns:
- Byte offset of this component.
void sp::video::VertexFormatUniversal::addFogCoord |
( |
const ERendererDataTypes |
Type = DATATYPE_FLOAT |
) |
|
Adds the fog coordinate component to the vertex format. The size is always 1. This feature is only supported in OpenGL for fixed function pipeline.
void sp::video::VertexFormatUniversal::addNormal |
( |
const ERendererDataTypes |
Type = DATATYPE_FLOAT |
) |
|
Adds the normal vector component to the vertex format. The size is always 3.
void sp::video::VertexFormatUniversal::addTangent |
( |
const ERendererDataTypes |
Type = DATATYPE_FLOAT |
) |
|
Adds the tangent vector component to the vertex format. The size is always 3. This feature is only supported with Direct3D11. For other renderers add a universal component.
void sp::video::VertexFormatUniversal::addTexCoord |
( |
const ERendererDataTypes |
Type = DATATYPE_FLOAT , |
|
|
s32 |
Size = 2 | |
|
) |
| | |
Adds a new texture coordiante to the vertex format. You can not use texcoord 0 and 2 or anything like that. Only 0, 1, 2 etc.
- Parameters:
-
| Size,: | Valid numbers are: 1 -> S, 2 -> ST, 3 -> STR and 4 -> STRQ. By default 2. |
Adds a universal vertex attribute to the vertex format. This can only be used in combination with a shader program.
- Parameters:
-
| Size,: | Must be in range [0, 3]. |
| Name,: | Specifies attribute name. For OpenGL it can be any name used in the vertex shader. For Direct3D11 it needs to be one of the HLSL semantics (POSITION[n], COLOR[n] etc.): |
| Normalize,: | Specifies whether the attribute shall be normalized or not. e.g. when you use the ubyte data type this can be useful to normlize the vector to the range [0.0, 1.0]. |
| Attribute,: | Specifies which kind of attribute this universal is. By default its an unknown attribute. If you specify it as a vertex coordinate e.g. you can set its data by the "setVertexCoord" function. In this case morph-target- or skeletal animation will further more work fine. |
void sp::video::VertexFormatUniversal::clear |
( |
|
) |
|
Clears the whole vertex format. After calling this function the format size is 0.
u32 sp::video::VertexFormatUniversal::getFormatSize |
( |
|
) |
const [virtual] |
Removes the specified vertex attribute.
- Parameters:
-
| Type,: | Specifies the vertex attribute which is to be removed. If the type is a texture coordiante or universal attribute the last one will be removed. |
The documentation for this class was generated from the following files: