mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Keep M2 models permanently in VRAM to eliminate loading hitches
Modern GPUs have 8-16GB VRAM - leverage this to cache all M2 models permanently. Changes: - Disabled cleanupUnusedModels() call when tiles unload - Models now stay in VRAM after initial load, even when tiles unload - Increased taxi mounting delay from 3s to 5s for more precache time - Added logging: M2 model count, instance count, and GPU upload duration - Added debug logging when M2 models are uploaded per tile This fixes the "building pops up then pause" issue - models were being: 1. Loaded when tile loads 2. Unloaded when tile unloads (behind taxi) 3. Re-loaded when flying through again (causing hitch) Now models persist in VRAM permanently (few hundred MB for typical session). First pass loads to VRAM, subsequent passes are instant.
This commit is contained in:
parent
92031102e4
commit
71b52046e0
3 changed files with 26 additions and 14 deletions
|
|
@ -262,11 +262,11 @@ void GameHandler::update(float deltaTime) {
|
|||
}
|
||||
}
|
||||
|
||||
// Mounting delay for taxi (terrain precache time)
|
||||
// Mounting delay for taxi (terrain + M2 model precache time)
|
||||
if (taxiMountingDelay_) {
|
||||
taxiMountingTimer_ += deltaTime;
|
||||
// 3 second delay for "mounting" animation and terrain precache
|
||||
if (taxiMountingTimer_ >= 3.0f) {
|
||||
// 5 second delay for terrain and M2 models to load and upload to VRAM
|
||||
if (taxiMountingTimer_ >= 5.0f) {
|
||||
taxiMountingDelay_ = false;
|
||||
taxiMountingTimer_ = 0.0f;
|
||||
// Upload all precached tiles to GPU before flight starts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue