mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-08 01:53:52 +00:00
perf(editor): cache M2/WMO models across rebuilds, only clear instances
The editor's rebuildObjects path was destroying every cached model and re-uploading it on every (debounced) change. Added M2Renderer::clearInstances that drops only the instance list while keeping models loaded. Editor's clearObjects switches to clearInstances (M2) + clearInstances (WMO), and persistent path->modelId maps survive across rebuilds. clearTerrain fully evicts when loading a new zone.
This commit is contained in:
parent
f18976ced9
commit
5241bbd669
4 changed files with 45 additions and 5 deletions
|
|
@ -357,6 +357,9 @@ public:
|
|||
void removeInstances(const std::vector<uint32_t>& instanceIds);
|
||||
void setSkipCollision(uint32_t instanceId, bool skip);
|
||||
void clear();
|
||||
/** Drop all instances but keep models in GPU memory. Cheap path for the
|
||||
* editor's rebuild loop where the same model is re-instanced repeatedly. */
|
||||
void clearInstances();
|
||||
void cleanupUnusedModels();
|
||||
|
||||
bool checkCollision(const glm::vec3& from, const glm::vec3& to,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue