| 426 | |
| 427 | |
| 428 | void Tr2MeshBase::GetBatches( ITriRenderBatchAccumulator* batches, |
| 429 | const Tr2MeshAreaVector* areas, |
| 430 | const Tr2PerObjectData* data, |
| 431 | float screenSize ) const |
| 432 | { |
| 433 | if( !GetDisplay() ) |
| 434 | { |
| 435 | return; |
| 436 | } |
| 437 | |
| 438 | auto geometry = GetGeometryResource(); |
| 439 | if( !geometry || !geometry->IsGood() ) |
| 440 | { |
| 441 | return; |
| 442 | } |
| 443 | TriGeometryResLodData* lod = geometry->GetMeshLod( m_meshIndex, screenSize ); |
| 444 | |
| 445 | if( !lod || !lod->m_allocationsValid ) |
| 446 | { |
| 447 | return; |
| 448 | } |
| 449 | |
| 450 | for( auto& area : *areas ) |
| 451 | { |
| 452 | if( auto batch = CreateGeometryBatch( lod, area, data ) ) |
| 453 | { |
| 454 | batch.SetPickingData( m_meshIndex, area->GetIndex() ); |
| 455 | batches->Commit( batch ); |
| 456 | } |
| 457 | } |
| 458 | } |
| 459 | |
| 460 | // ------------------------------------------------------------- |
| 461 | // Description: |
nothing calls this directly
no test coverage detected