Optimize Scene Rendering (cache drawable bounds and layers for culling with less cache misses)

This commit is contained in:
Wojtek Figat
2021-06-28 22:04:25 +02:00
parent e61ebaa71b
commit d7332509f7
26 changed files with 335 additions and 130 deletions

View File

@@ -439,6 +439,8 @@ void AnimatedModel::UpdateBounds()
BoundingBox::Transform(_boxLocal, _world, _box);
BoundingSphere::FromBox(_box, _sphere);
if (_sceneRenderingKey != -1)
GetSceneRendering()->UpdateGeometry(this, _sceneRenderingKey);
}
void AnimatedModel::UpdateSockets()
@@ -758,4 +760,6 @@ void AnimatedModel::OnTransformChanged()
_transform.GetWorld(_world);
BoundingBox::Transform(_boxLocal, _world, _box);
BoundingSphere::FromBox(_box, _sphere);
if (_sceneRenderingKey != -1)
GetSceneRendering()->UpdateGeometry(this, _sceneRenderingKey);
}