| 357 | } |
| 358 | |
| 359 | void EveSpherePin::GetBatchWithEffect( ITriRenderBatchAccumulator* accumulator, const Tr2PerObjectData* perObjectData, Tr2Effect* effect ) |
| 360 | { |
| 361 | if( !m_geometryResource ) |
| 362 | { |
| 363 | return; |
| 364 | } |
| 365 | |
| 366 | if( !m_geometryResource->IsGood() ) |
| 367 | { |
| 368 | return; |
| 369 | } |
| 370 | |
| 371 | if( m_geometryResource->GetMeshCount() < 1 ) |
| 372 | { |
| 373 | return; |
| 374 | } |
| 375 | |
| 376 | const TriGeometryResLodData* lod = m_geometryResource->GetMeshLod( 0, 0 ); |
| 377 | if( !lod || !lod->m_allocationsValid ) |
| 378 | { |
| 379 | return; |
| 380 | } |
| 381 | |
| 382 | if( !m_indexBuffer.IsValid() ) |
| 383 | { |
| 384 | return; |
| 385 | } |
| 386 | |
| 387 | Tr2RenderBatch batch; |
| 388 | batch.SetMaterial( effect ); |
| 389 | batch.SetPerObjectData( perObjectData ); |
| 390 | batch.SetGeometry( lod->m_mesh->m_vertexDeclarationHandle, lod->m_vertexAllocation.GetBuffer(), lod->m_vertexAllocation.GetStride(), m_indexBuffer, m_indexBuffer.GetDesc().stride ); |
| 391 | batch.SetDrawIndexedInstanced( m_primitiveCount * 3, 1, 0, lod->m_vertexAllocation.GetOffset() / lod->m_vertexAllocation.GetStride(), 0 ); |
| 392 | accumulator->Commit( batch ); |
| 393 | } |
| 394 | |
| 395 | void EveSpherePin::GetPickingBatches( ITriRenderBatchAccumulator* batches, Tr2PickTypes pickTypes, const Tr2PerObjectData* perObjectData ) |
| 396 | { |
nothing calls this directly
no test coverage detected