History

Fix for Oculus timewarp judder introduced by 20d784ba39db

Moved myAvatar->updateFromHMDSensorMatrix from Application::update back into Application::paintGL, so it occurs between displayPlugin->preRender() and displayPlugin->display(). We should render with the most up-to-date camera position as possible, and sample it at the same frequency as the display rate.

Anthony J. Thibault committed 11 years ago

Commit e32eb381 parent 2d477ad3 files · +15 −5Browse files

Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Application.cpp+3−3
@@ -1055,6 +1055,9 @@ void Application::paintGL() { · 1054 unmodified lines
10551055 displayPlugin->preRender();
10561056 _offscreenContext->makeCurrent();
10571057
1058+ // update the avatar with a fresh HMD pose
1059+ _myAvatar->updateFromHMDSensorMatrix(getHMDSensorPose());
1060+
10581061 auto lodManager = DependencyManager::get<LODManager>();
10591062
10601063
@@ -2895,9 +2898,6 @@ void Application::update(float deltaTime) { · 1834 unmodified lines
28952898 userInputMapper->getActionState(UserInputMapper::SHIFT), RIGHT_HAND_INDEX);
28962899 }
28972900
2898− // update the avatar with a fresh HMD pose
2899− _myAvatar->updateFromHMDSensorMatrix(getHMDSensorPose(), deltaTime);
2900−
29012901 updateThreads(deltaTime); // If running non-threaded, then give the threads some time to process...
29022902
29032903 updateCamera(deltaTime); // handle various camera tweaks like off axis projection