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

Method GetInstanceData

trinity/Resources/TriGeometryRes.cpp:2814–2828  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2812}
2813
2814ITr2InstanceData::InstanceData TriGeometryRes::GetInstanceData( unsigned int bufferIndex, float screenSize ) const
2815{
2816 auto mesh = GetMeshData( bufferIndex );
2817
2818 if( !mesh )
2819 {
2820 static Tr2BufferAL nullVB;
2821 return { nullVB };
2822 }
2823
2824 auto lod = GetMeshLod( bufferIndex, screenSize );
2825 return {
2826 lod->m_vertexAllocation.GetBuffer(), lod->m_vertexAllocation.GetOffset(), mesh->m_bytesPerVertex, lod->m_vertexCount
2827 };
2828}
2829
2830// --------------------------------------------------------------------------------------
2831// Description:

Callers 1

GetBatchesMethod · 0.45

Calls 2

GetBufferMethod · 0.45
GetOffsetMethod · 0.45

Tested by

no test coverage detected