Skip to content

Commit

Permalink
Merge pull request Revolutionary-Games#27 from Revolutionary-Games/25…
Browse files Browse the repository at this point in the history
…_ogre_engine_update

Fix OgreEngine::update() to use RAII StateLock
  • Loading branch information
Daniferrito committed May 17, 2013
2 parents b119222 + 653c821 commit f8cca45
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 @@ -260,16 +260,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 f8cca45

Please sign in to comment.