mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
/components/ code should not access the stereo manager without checking whether or not stereo is enabled first. Stereo component code should not read settings itself, but rather take settings as parameters.
This commit is contained in:
parent
675dfb9725
commit
fe066069d7
14 changed files with 130 additions and 94 deletions
|
@ -54,11 +54,14 @@ namespace SceneUtil
|
|||
if (frameNumber > vdd->mFrameNumber)
|
||||
{
|
||||
apply(vdd->mCamera);
|
||||
auto& sm = Stereo::Manager::instance();
|
||||
if (sm.getEye(cv) == Stereo::Eye::Left)
|
||||
applyLeft(vdd->mCamera);
|
||||
if (sm.getEye(cv) == Stereo::Eye::Right)
|
||||
applyRight(vdd->mCamera);
|
||||
if (Stereo::getStereo())
|
||||
{
|
||||
auto& sm = Stereo::Manager::instance();
|
||||
if (sm.getEye(cv) == Stereo::Eye::Left)
|
||||
applyLeft(vdd->mCamera);
|
||||
if (sm.getEye(cv) == Stereo::Eye::Right)
|
||||
applyRight(vdd->mCamera);
|
||||
}
|
||||
vdd->mCamera->accept(*cv);
|
||||
}
|
||||
vdd->mFrameNumber = frameNumber;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue