Browse Source

Merge pull request #914 from mendsley/vr_mirrorcrash

Do not render VR mirror texture is the headset is not rendering
Branimir Karadžić 9 years ago
parent
commit
2703ff895c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/hmd_ovr.cpp

+ 4 - 1
src/hmd_ovr.cpp

@@ -197,7 +197,10 @@ namespace bgfx
 		}
 
 		// perform mirror texture blit right after the entire frame is submitted to HMD
-		m_mirror->blit(m_hmd);
+		if (result != ovrSuccess_NotVisible)
+		{
+			m_mirror->blit(m_hmd);
+		}
 
 		m_hmdToEyeOffset[0] = m_erd[0].HmdToEyeOffset;
 		m_hmdToEyeOffset[1] = m_erd[1].HmdToEyeOffset;