Improve equipment texture performance and accuracy

Cache composite textures by input key so identical NPC equipment
combos share one GPU texture. Use DBC layout system for
ItemDisplayInfo texture component fields instead of hardcoded
indices (cross-expansion support). Selective player equipment
re-emission on item query response instead of broadcasting to
all players.
This commit is contained in:
Kelsi 2026-02-14 15:48:58 -08:00
parent d4bea91e37
commit 3675721016
8 changed files with 78 additions and 12 deletions

View file

@ -247,6 +247,7 @@ private:
uint64_t lastUse = 0;
};
std::unordered_map<std::string, TextureCacheEntry> textureCache;
std::unordered_map<std::string, GLuint> compositeCache_; // key → GPU texture for reuse
size_t textureCacheBytes_ = 0;
uint64_t textureCacheCounter_ = 0;
size_t textureCacheBudgetBytes_ = 1024ull * 1024 * 1024; // Default, overridden at init