| 135 | |
| 136 | |
| 137 | void Tr2SolidSet::GetBatchesImpl( ITriRenderBatchAccumulator* accumulator, const Tr2PerObjectData* perObjectData, Tr2Material* effect, GetBatchesReason reason ) |
| 138 | { |
| 139 | if( !m_vertexBuffer.IsValid() ) |
| 140 | { |
| 141 | return; |
| 142 | } |
| 143 | |
| 144 | if( m_vertexDeclHandle == Tr2EffectStateManager::UNINITIALIZED_DECLARATION ) |
| 145 | { |
| 146 | return; |
| 147 | } |
| 148 | |
| 149 | Tr2RenderBatch batch; |
| 150 | batch.SetMaterial( effect ); |
| 151 | batch.SetPerObjectData( perObjectData ); |
| 152 | batch.SetVertexDeclaration( m_vertexDeclHandle ); |
| 153 | batch.SetStreamSource( 0, m_vertexBuffer, sizeof( TriangleVertex ) ); |
| 154 | batch.SetDrawInstanced( m_currentSubmittedTriangleCount * 3, 1, 0, 0 ); |
| 155 | accumulator->Commit( batch ); |
| 156 | } |
| 157 | |
| 158 | void Tr2SolidSet::AddTriangle( const Vector3& position1, const Vector4& color1, const Vector3& position2, const Vector4& color2, const Vector3& position3, const Vector4& color3 ) |
| 159 | { |
nothing calls this directly
no test coverage detected