mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-04 18:11:01 -05:00
rename of mutex
This commit is contained in:
@@ -159,9 +159,8 @@ private:
|
||||
|
||||
glm::vec3 _lookUp;
|
||||
|
||||
//cluster variables
|
||||
std::mutex _syncMutex;
|
||||
|
||||
std::mutex _mutex;
|
||||
|
||||
//local variables
|
||||
glm::mat4 _localViewRotationMatrix;
|
||||
glm::vec2 _localScaling;
|
||||
|
||||
+8
-8
@@ -219,43 +219,43 @@ const glm::vec3& Camera::lookUpVector() const
|
||||
}
|
||||
|
||||
void Camera::serialize(SyncBuffer* syncBuffer){
|
||||
_syncMutex.lock();
|
||||
_mutex.lock();
|
||||
|
||||
syncBuffer->encode(_sharedViewRotationMatrix);
|
||||
syncBuffer->encode(_sharedPosition);
|
||||
syncBuffer->encode(_sharedScaling);
|
||||
|
||||
_syncMutex.unlock();
|
||||
_mutex.unlock();
|
||||
}
|
||||
|
||||
void Camera::deserialize(SyncBuffer* syncBuffer){
|
||||
_syncMutex.lock();
|
||||
_mutex.lock();
|
||||
|
||||
syncBuffer->decode(_sharedViewRotationMatrix);
|
||||
syncBuffer->decode(_sharedPosition);
|
||||
syncBuffer->decode(_sharedScaling);
|
||||
|
||||
_syncMutex.unlock();
|
||||
_mutex.unlock();
|
||||
}
|
||||
|
||||
void Camera::postSynchronizationPreDraw(){
|
||||
_syncMutex.lock();
|
||||
_mutex.lock();
|
||||
|
||||
_syncedViewRotationMatrix = _sharedViewRotationMatrix;
|
||||
_syncedPosition = _sharedPosition;
|
||||
_syncedScaling = _sharedScaling;
|
||||
|
||||
_syncMutex.unlock();
|
||||
_mutex.unlock();
|
||||
}
|
||||
|
||||
void Camera::preSynchronization(){
|
||||
_syncMutex.lock();
|
||||
_mutex.lock();
|
||||
|
||||
_sharedViewRotationMatrix = _localViewRotationMatrix;
|
||||
_sharedPosition = _localPosition;
|
||||
_sharedScaling = _localScaling;
|
||||
|
||||
_syncMutex.unlock();
|
||||
_mutex.unlock();
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user