mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
Hardware Skinning Support
- Supports GL, D3D9 & D3D11 - Extends vertex formats & shadergen to support blend indices and weights - Adds basic support for using 4x3 matrices for shader constants - Supports software fallback
This commit is contained in:
parent
507c239a87
commit
3496c549b5
72 changed files with 2533 additions and 1327 deletions
|
|
@ -187,6 +187,28 @@ void GFXGLVertexDecl::_initVerticesFormat(U32 stream)
|
|||
|
||||
buffer += element.getSizeInBytes();
|
||||
}
|
||||
else if ( element.isSemantic( GFXSemantic::BLENDWEIGHT ) )
|
||||
{
|
||||
glElement.attrIndex = Torque::GL_VertexAttrib_BlendWeight0 + element.getSemanticIndex();
|
||||
glElement.elementCount = 4;
|
||||
glElement.normalized = false;
|
||||
glElement.type = GL_FLOAT;
|
||||
glElement.stride = vertexSize;
|
||||
glElement.pointerFirst = (void*)buffer;
|
||||
|
||||
buffer += element.getSizeInBytes();
|
||||
}
|
||||
else if ( element.isSemantic( GFXSemantic::BLENDINDICES ) )
|
||||
{
|
||||
glElement.attrIndex = Torque::GL_VertexAttrib_BlendIndex0 + element.getSemanticIndex();
|
||||
glElement.elementCount = 4;
|
||||
glElement.normalized = false;
|
||||
glElement.type = GL_UNSIGNED_BYTE;
|
||||
glElement.stride = vertexSize;
|
||||
glElement.pointerFirst = (void*)buffer;
|
||||
|
||||
buffer += element.getSizeInBytes();
|
||||
}
|
||||
else // Everything else is a texture coordinate.
|
||||
{
|
||||
String name = element.getSemantic();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue