mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Optimize WMO rendering and collision performance
- Add texture-sorted batch merging with glMultiDrawElements to reduce draw calls - Pre-compute merged batches at load time instead of per-frame - Add persistent floor height cache with disk save/load (cache/wmo_floor_cache.bin) - Reduce collision focus radius and sweep steps for faster collision checks - Add floor cache size to performance HUD - Reduce WMO group distance culling to 80 units
This commit is contained in:
parent
44b03a06a0
commit
a96ea0758c
7 changed files with 229 additions and 40 deletions
|
|
@ -241,7 +241,10 @@ bool CharacterPreview::loadCharacter(game::Race race, game::Gender gender,
|
|||
}
|
||||
}
|
||||
|
||||
charRenderer_->loadModel(model, PREVIEW_MODEL_ID);
|
||||
if (!charRenderer_->loadModel(model, PREVIEW_MODEL_ID)) {
|
||||
LOG_WARNING("CharacterPreview: failed to load model to GPU");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Composite body skin + face + underwear overlays
|
||||
if (!bodySkinPath.empty()) {
|
||||
|
|
@ -331,7 +334,9 @@ void CharacterPreview::update(float deltaTime) {
|
|||
}
|
||||
|
||||
void CharacterPreview::render() {
|
||||
if (!fbo_ || !charRenderer_ || !camera_ || !modelLoaded_) return;
|
||||
if (!fbo_ || !charRenderer_ || !camera_ || !modelLoaded_) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Save current viewport
|
||||
GLint prevViewport[4];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue