Skip to content

Commit

Permalink
Fix OgreEngine::update() to use RAII StateLock
Browse files Browse the repository at this point in the history
  • Loading branch information
bkloster committed May 17, 2013
1 parent 1311d90 commit 653c821
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/ogre/ogre_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,16 +272,12 @@ OgreEngine::shutdown() {

void
OgreEngine::update() {
// Lock shared state
InputState::instance().lockWorkingCopy();
RenderState::instance().lockStable();
StateLock<InputState, StateBuffer::WorkingCopy> inputLock;
StateLock<RenderState, StateBuffer::Stable> renderLock;
// Handle events
Ogre::WindowEventUtilities::messagePump();
// Update systems
Engine::update();
// Release shared state
RenderState::instance().releaseStable();
InputState::instance().releaseWorkingCopy();
}


Expand Down

0 comments on commit 653c821

Please sign in to comment.