-------------------------------------------------------------------------------------- Description: Sorts and gathers transparent batches Arguments: objectsWithTransparencies - a list of renderables with transparencies batches - the batch map to be used --------------------------------------------------------------------------------------
| 833 | // batches - the batch map to be used |
| 834 | // -------------------------------------------------------------------------------------- |
| 835 | void EveSpaceScene::PrepareTransparentBatch( Tr2RenderableSortList& objectsWithTransparencies, BatchMap& batches, Tr2RenderReason reason ) |
| 836 | { |
| 837 | CCP_STATS_ZONE( __FUNCTION__ ); |
| 838 | |
| 839 | // Sort objects front to back |
| 840 | std::stable_sort( objectsWithTransparencies.begin(), objectsWithTransparencies.end() ); |
| 841 | |
| 842 | // Add the objects, back to front |
| 843 | for( Tr2RenderableSortList::const_reverse_iterator it = objectsWithTransparencies.rbegin(); it != objectsWithTransparencies.rend(); ++it ) |
| 844 | { |
| 845 | ITr2Renderable* r = it->m_object; |
| 846 | Tr2PerObjectData* objectData = r->GetPerObjectData( batches[TRIBATCHTYPE_TRANSPARENT] ); |
| 847 | r->GetBatches( batches[TRIBATCHTYPE_TRANSPARENT], TRIBATCHTYPE_TRANSPARENT, objectData, reason ); |
| 848 | } |
| 849 | } |
| 850 | |
| 851 | void GetBatchesFromRenderables( ITr2Renderable** const objectRenderables, const unsigned renderableCount, Tr2RenderableSortList* const objectsWithTransparencies, EveSpaceScene::BatchMap& batches, const TriBatchType* batchTypes, const unsigned batchTypeCount, Tr2RenderReason reason ) |
| 852 | { |
nothing calls this directly
no test coverage detected