MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / getFormat

Method getFormat

Engine/source/ts/tsMesh.cpp:3383–3406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3381}
3382
3383void TSBasicVertexFormat::getFormat(GFXVertexFormat &fmt)
3384{
3385 // NOTE: previously the vertex data was padded to allow for verts to be skinned via SSE.
3386 // since we now prefer to skin on the GPU and use a basic non-SSE fallback for software
3387 // skinning, adding in padding via GFXSemantic::PADDING or dummy fields is no longer required.
3388 fmt.addElement(GFXSemantic::POSITION, GFXDeclType_Float3);
3389 fmt.addElement(GFXSemantic::TANGENTW, GFXDeclType_Float, 3);
3390 fmt.addElement(GFXSemantic::NORMAL, GFXDeclType_Float3);
3391 fmt.addElement(GFXSemantic::TANGENT, GFXDeclType_Float3);
3392
3393 fmt.addElement(GFXSemantic::TEXCOORD, GFXDeclType_Float2, 0);
3394
3395 if (texCoordOffset >= 0 || colorOffset >= 0)
3396 {
3397 fmt.addElement(GFXSemantic::TEXCOORD, GFXDeclType_Float2, 1);
3398 fmt.addElement(GFXSemantic::COLOR, GFXDeclType_Color);
3399 }
3400
3401 for (U32 i=0; i<numBones; i++)
3402 {
3403 fmt.addElement(GFXSemantic::BLENDINDICES, GFXDeclType_UByte4, i);
3404 fmt.addElement(GFXSemantic::BLENDWEIGHT, GFXDeclType_Float4, i);
3405 }
3406}
3407
3408void TSBasicVertexFormat::calculateSize()
3409{

Callers 15

updateReflectionMethod · 0.45
getRefractTexMethod · 0.45
initVertexFeaturesMethod · 0.45
assembleShapeMethod · 0.45
getBackBufferTexMethod · 0.45
_initShaderMethod · 0.45
_updateBaseTextureMethod · 0.45
importMethod · 0.45
getPositionMethod · 0.45
setPositionMethod · 0.45
_resetStreamMethod · 0.45
_allocVoiceMethod · 0.45

Calls 1

addElementMethod · 0.45

Tested by

no test coverage detected