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

Method UpdateSyncronous

trinity/Eve/SpaceObject/Children/EveChildLineSet.cpp:268–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268void EveChildLineSet::UpdateSyncronous( const EveUpdateContext& updateContext, const EveChildUpdateParams& params )
269{
270 CreateSpriteVertexDeclaration();
271
272 m_ownerMaxSpeed = params.ownerMaxSpeed;
273
274 bool updateBounds = false;
275
276 for( auto it = begin( m_lines ); it != end( m_lines ); ++it )
277 {
278 const bool updateLocalBoundingSphere = ( *it )->Update( updateContext, params );
279 updateBounds = updateBounds || updateLocalBoundingSphere;
280 }
281
282 if( updateBounds )
283 {
284 UpdateBoundingSphere( false );
285 }
286
287 if( !IsUpdating() )
288 {
289 return;
290 }
291
292 if( m_type == OBJECT_RENDER || m_type == BOTH )
293 {
294 USE_MAIN_THREAD_RENDER_CONTEXT();
295 UpdateBuffer( renderContext );
296 }
297
298 if( m_type == LINE_RENDER || m_type == BOTH )
299 {
300 InitializeLineSet();
301 }
302}
303
304void EveChildLineSet::UpdateBuffer( Tr2RenderContext& renderContext )
305{

Callers

nothing calls this directly

Calls 3

beginFunction · 0.50
endFunction · 0.50
UpdateMethod · 0.45

Tested by

no test coverage detected