mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 11:17:38 +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() {
|
void Model::computeMeshPartLocalBounds() {
|
||||||
render::Transaction transaction;
|
render::Transaction transaction;
|
||||||
|
auto meshStates = _meshStates;
|
||||||
for (auto renderItem : _modelMeshRenderItemIDs) {
|
for (auto renderItem : _modelMeshRenderItemIDs) {
|
||||||
transaction.updateItem<ModelMeshPartPayload>(renderItem, [&](ModelMeshPartPayload& data) {
|
transaction.updateItem<ModelMeshPartPayload>(renderItem, [this, meshStates](ModelMeshPartPayload& data) {
|
||||||
const Model::MeshState& state = _meshStates.at(data._meshIndex);
|
const Model::MeshState& state = meshStates.at(data._meshIndex);
|
||||||
if (_useDualQuaternionSkinning) {
|
if (_useDualQuaternionSkinning) {
|
||||||
data.computeAdjustedLocalBound(state.clusterDualQuaternions);
|
data.computeAdjustedLocalBound(state.clusterDualQuaternions);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue