mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Application: Improve scoping.
This commit is contained in:
parent
aecc5cd387
commit
d084142866
1 changed files with 26 additions and 30 deletions
|
@ -6993,16 +6993,13 @@ void Application::updateRenderArgs(float deltaTime) {
|
||||||
appRenderArgs._eyeToWorld = _myCamera.getTransform();
|
appRenderArgs._eyeToWorld = _myCamera.getTransform();
|
||||||
appRenderArgs._isStereo = false;
|
appRenderArgs._isStereo = false;
|
||||||
|
|
||||||
{
|
if (getActiveDisplayPlugin()->isStereo()) {
|
||||||
auto hmdInterface = DependencyManager::get<HMDScriptingInterface>();
|
auto hmdInterface = DependencyManager::get<HMDScriptingInterface>();
|
||||||
float ipdScale = hmdInterface->getIPDScale();
|
|
||||||
|
|
||||||
// scale IPD by sensorToWorldScale, to make the world seem larger or smaller accordingly.
|
// scale IPD by sensorToWorldScale, to make the world seem larger or smaller accordingly.
|
||||||
ipdScale *= sensorToWorldScale;
|
float ipdScale = hmdInterface->getIPDScale() * sensorToWorldScale;
|
||||||
|
|
||||||
auto baseProjection = appRenderArgs._renderArgs.getViewFrustum().getProjection();
|
auto baseProjection = appRenderArgs._renderArgs.getViewFrustum().getProjection();
|
||||||
|
|
||||||
if (getActiveDisplayPlugin()->isStereo()) {
|
|
||||||
// Stereo modes will typically have a larger projection matrix overall,
|
// Stereo modes will typically have a larger projection matrix overall,
|
||||||
// so we ask for the 'mono' projection matrix, which for stereo and HMD
|
// so we ask for the 'mono' projection matrix, which for stereo and HMD
|
||||||
// plugins will imply the combined projection for both eyes.
|
// plugins will imply the combined projection for both eyes.
|
||||||
|
@ -7031,7 +7028,6 @@ void Application::updateRenderArgs(float deltaTime) {
|
||||||
// Configure the type of display / stereo
|
// Configure the type of display / stereo
|
||||||
appRenderArgs._renderArgs._displayMode = (isHMDMode() ? RenderArgs::STEREO_HMD : RenderArgs::STEREO_MONITOR);
|
appRenderArgs._renderArgs._displayMode = (isHMDMode() ? RenderArgs::STEREO_HMD : RenderArgs::STEREO_MONITOR);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
appRenderArgs._renderArgs._stencilMaskMode = getActiveDisplayPlugin()->getStencilMaskMode();
|
appRenderArgs._renderArgs._stencilMaskMode = getActiveDisplayPlugin()->getStencilMaskMode();
|
||||||
if (appRenderArgs._renderArgs._stencilMaskMode == StencilMaskMode::MESH) {
|
if (appRenderArgs._renderArgs._stencilMaskMode == StencilMaskMode::MESH) {
|
||||||
|
|
Loading…
Reference in a new issue