MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetMeshVertexDeclaration

Function GetMeshVertexDeclaration

trinity/Tr2InstancedMesh.cpp:447–459  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Returns vertex declaration elements for a given mesh in geometry resource. Arguments: geometryRes - Geometry resource meshIndex - Mesh index in geometry resource elements - (out) Resulting array of vertex declaration elements; caller must allocate enough space for it count - (out) Number of elements

Source from the content-addressed store, hash-verified

445// false Otherwise
446// --------------------------------------------------------------------------------------
447static bool GetMeshVertexDeclaration( TriGeometryRes* geometryRes, int meshIndex, Tr2VertexDefinition& vd )
448{
449 if( geometryRes == nullptr || !geometryRes->IsGood() )
450 {
451 return false;
452 }
453 TriGeometryResMeshData* meshData = geometryRes->GetMeshData( meshIndex );
454 if( meshData == nullptr )
455 {
456 return false;
457 }
458 return Tr2EffectStateManager::GetVertexDeclarationElements( meshData->m_vertexDeclarationHandle, vd );
459}
460
461// --------------------------------------------------------------------------------------
462// Description:

Callers 1

Calls 2

GetMeshDataMethod · 0.80
IsGoodMethod · 0.45

Tested by

no test coverage detected