| 164 | } |
| 165 | |
| 166 | void EveLineSet::GetBatches( ITriRenderBatchAccumulator* accumulator, |
| 167 | TriBatchType batchType, |
| 168 | const Tr2PerObjectData* perObjectData, |
| 169 | Tr2RenderReason reason ) |
| 170 | { |
| 171 | // Is only rendered as transparent or additive. |
| 172 | if( !( batchType == TRIBATCHTYPE_TRANSPARENT && m_isRenderedAsTransparent ) && |
| 173 | !( batchType == TRIBATCHTYPE_ADDITIVE && !m_isRenderedAsTransparent ) ) |
| 174 | { |
| 175 | return; |
| 176 | } |
| 177 | |
| 178 | if( !m_display ) |
| 179 | { |
| 180 | return; |
| 181 | } |
| 182 | |
| 183 | if( !m_vertexBuffer.IsValid() ) |
| 184 | { |
| 185 | return; |
| 186 | } |
| 187 | |
| 188 | if( m_vertexDeclHandle == Tr2EffectStateManager::UNINITIALIZED_DECLARATION ) |
| 189 | { |
| 190 | return; |
| 191 | } |
| 192 | |
| 193 | Tr2RenderBatch batch; |
| 194 | batch.SetMaterial( m_effect ); |
| 195 | batch.SetPerObjectData( perObjectData ); |
| 196 | batch.SetVertexDeclaration( m_vertexDeclHandle ); |
| 197 | batch.SetStreamSource( 0, m_vertexBuffer, sizeof( EveLineData ) / 2 ); |
| 198 | batch.SetTopology( TOP_LINES ); |
| 199 | batch.SetDrawInstanced( m_currentSubmittedLineCount * 2, 1, 0, 0 ); |
| 200 | accumulator->Commit( batch ); |
| 201 | } |
| 202 | |
| 203 | float EveLineSet::GetSortValue() |
| 204 | { |
nothing calls this directly
no test coverage detected