mirror of
https://github.com/overte-org/overte.git
synced 2025-04-11 00:23:01 +02:00
need to copy meshStates on main thread
This commit is contained in:
parent
708632ee82
commit
fd88ec0d16
1 changed files with 3 additions and 2 deletions
|
@ -1347,9 +1347,10 @@ void Model::updateRig(float deltaTime, glm::mat4 parentTransform) {
|
|||
|
||||
void Model::computeMeshPartLocalBounds() {
|
||||
render::Transaction transaction;
|
||||
auto meshStates = _meshStates;
|
||||
for (auto renderItem : _modelMeshRenderItemIDs) {
|
||||
transaction.updateItem<ModelMeshPartPayload>(renderItem, [&](ModelMeshPartPayload& data) {
|
||||
const Model::MeshState& state = _meshStates.at(data._meshIndex);
|
||||
transaction.updateItem<ModelMeshPartPayload>(renderItem, [this, meshStates](ModelMeshPartPayload& data) {
|
||||
const Model::MeshState& state = meshStates.at(data._meshIndex);
|
||||
if (_useDualQuaternionSkinning) {
|
||||
data.computeAdjustedLocalBound(state.clusterDualQuaternions);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue