| 266 | } |
| 267 | |
| 268 | void 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 | |
| 304 | void EveChildLineSet::UpdateBuffer( Tr2RenderContext& renderContext ) |
| 305 | { |