mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-20 17:39:46 +00:00
optimize animator
This commit is contained in:
parent
17bdbb1a38
commit
fd17ce32ab
11 changed files with 294 additions and 2 deletions
|
|
@ -329,6 +329,18 @@ void WorldRenderer::renderInWorldLines(
|
|||
}
|
||||
}
|
||||
|
||||
void WorldRenderer::updateEntitiesCulling(const Camera& camera) {
|
||||
bool culling = engine.getSettings().graphics.frustumCulling.get();
|
||||
if (culling) {
|
||||
frustumCulling->update(camera.getProjView());
|
||||
}
|
||||
level.entities->updateCulling(
|
||||
culling ? frustumCulling.get() : nullptr,
|
||||
player.currentCamera.get() == player.fpCamera.get() ? player.getEntity()
|
||||
: 0
|
||||
);
|
||||
}
|
||||
|
||||
void WorldRenderer::update(const Camera& camera, float delta) {
|
||||
timer += delta;
|
||||
chunksRenderer->update();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue