rename of mutex

This commit is contained in:
Joakim Kilby
2015-06-17 08:39:49 +02:00
parent 91247d4ac9
commit 74ab05ec37
2 changed files with 10 additions and 11 deletions
+2 -3
View File
@@ -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
View File
@@ -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();
}
//