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

Method getFormat

Engine/source/ts/tsMesh.cpp:3378–3401  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 15

updateReflectionMethod · 0.45
getRefractTexMethod · 0.45
initVertexFeaturesMethod · 0.45
assembleShapeMethod · 0.45
getBackBufferTexMethod · 0.45
_createPassMethod · 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