mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-03-13 16:38:53 +01:00
Unlock the mutex after the rects are refreshed in the material cache in TerrainLibraryMergerPCM.
This commit is contained in:
parent
2688162cf9
commit
e11e75e5ea
@ -174,11 +174,10 @@ void TerrainLibraryMergerPCM::_material_cache_get_key(Ref<TerrainChunk> chunk) {
|
||||
|
||||
_material_cache[hash] = cache;
|
||||
|
||||
//unlock here, so if a different thread need the cache it will be able to immediately access the materials and surfaces when it gets it.
|
||||
_material_cache_mutex.unlock();
|
||||
|
||||
//this will generate the atlases
|
||||
cache->refresh_rects();
|
||||
|
||||
_material_cache_mutex.unlock();
|
||||
}
|
||||
|
||||
Ref<TerrainMaterialCache> TerrainLibraryMergerPCM::_material_cache_get(const int key) {
|
||||
|
Loading…
Reference in New Issue
Block a user