MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetBatches

Method GetBatches

trinity/Eve/UI/EveLineSet.cpp:166–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void 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
203float EveLineSet::GetSortValue()
204{

Callers

nothing calls this directly

Calls 8

SetVertexDeclarationMethod · 0.80
SetDrawInstancedMethod · 0.80
IsValidMethod · 0.45
SetMaterialMethod · 0.45
SetPerObjectDataMethod · 0.45
SetStreamSourceMethod · 0.45
SetTopologyMethod · 0.45
CommitMethod · 0.45

Tested by

no test coverage detected