Skip to content

Commit

Permalink
Do not recreate clearColorSwapChain if it already exists (#3391)
Browse files Browse the repository at this point in the history
  • Loading branch information
MortimerGoro authored and bluemarvin committed May 18, 2020
1 parent c38e039 commit 414048e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 414048e

Please sign in to comment.