mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-03 08:03:50 +00:00
Preload terrain textures on background thread and fix ramp Z-snapping
Load BLP texture data during prepareTile() and upload to GL cache in finalizeTile(), eliminating file I/O stalls on the main thread. Reduce ready tiles per frame to 1. Fix camera sweep to snap Z to ramp surfaces. Change hearthstone action bar slot from spell to item.
This commit is contained in:
parent
7748e61edd
commit
b520652242
6 changed files with 66 additions and 13 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "pipeline/terrain_mesh.hpp"
|
||||
#include "pipeline/blp_loader.hpp"
|
||||
#include "rendering/shader.hpp"
|
||||
#include "rendering/texture.hpp"
|
||||
#include "rendering/camera.hpp"
|
||||
|
|
@ -87,6 +88,12 @@ public:
|
|||
*/
|
||||
void removeTile(int tileX, int tileY);
|
||||
|
||||
/**
|
||||
* Upload pre-loaded BLP textures to the GL texture cache.
|
||||
* Called before loadTerrain() so texture loading avoids file I/O.
|
||||
*/
|
||||
void uploadPreloadedTextures(const std::unordered_map<std::string, pipeline::BLPImage>& textures);
|
||||
|
||||
/**
|
||||
* Render loaded terrain
|
||||
* @param camera Camera for view/projection matrices
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue