add mutex for animation updates

This commit is contained in:
Nick Fisher
2023-11-03 13:10:02 +08:00
parent 6671ced45d
commit 5ba5d7d6ea
2 changed files with 12 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
#pragma once
#include <mutex>
#include <filament/Scene.h>
#include <gltfio/AssetLoader.h>
@@ -82,6 +84,7 @@ namespace polyvox {
gltfio::ResourceLoader* _gltfResourceLoader = nullptr;
gltfio::TextureProvider* _stbDecoder = nullptr;
gltfio::TextureProvider* _ktxDecoder = nullptr;
std::mutex _animationMutex;
vector<SceneAsset> _assets;
tsl::robin_map<EntityId, int> _entityIdLookup;