mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Stabilize streaming memory and parser handling; revert socket recv optimizations
This commit is contained in:
parent
c914295d20
commit
ae88b226b5
15 changed files with 591 additions and 161 deletions
|
|
@ -2756,6 +2756,19 @@ void Renderer::update(float deltaTime) {
|
|||
performanceHUD->update(deltaTime);
|
||||
}
|
||||
|
||||
// Periodic cache hygiene: drop model GPU data no longer referenced by active instances.
|
||||
static float modelCleanupTimer = 0.0f;
|
||||
modelCleanupTimer += deltaTime;
|
||||
if (modelCleanupTimer >= 5.0f) {
|
||||
if (wmoRenderer) {
|
||||
wmoRenderer->cleanupUnusedModels();
|
||||
}
|
||||
if (m2Renderer) {
|
||||
m2Renderer->cleanupUnusedModels();
|
||||
}
|
||||
modelCleanupTimer = 0.0f;
|
||||
}
|
||||
|
||||
auto updateEnd = std::chrono::steady_clock::now();
|
||||
lastUpdateMs = std::chrono::duration<double, std::milli>(updateEnd - updateStart).count();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue