From 414048e56248aa43b47c83e0609831bd19be44e9 Mon Sep 17 00:00:00 2001 From: Imanol Fernandez Date: Mon, 18 May 2020 22:01:21 +0200 Subject: [PATCH] Do not recreate clearColorSwapChain if it already exists (#3391) --- app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp b/app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp index 9657fff58..ceef11f40 100644 --- a/app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp +++ b/app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp @@ -1272,7 +1272,9 @@ DeviceDelegateOculusVR::EnterVR(const crow::BrowserEGLContext& aEGLContext) { return; } - m.clearColorSwapChain = m.CreateClearColorSwapChain(800, 450); + if (!m.clearColorSwapChain) { + m.clearColorSwapChain = m.CreateClearColorSwapChain(800, 450); + } vrb::RenderContextPtr render = m.context.lock(); for (int i = 0; i < VRAPI_EYE_COUNT; ++i) {