Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit 47cc413

Browse files
authored
Do not recreate clearColorSwapChain if it already exists (#3391)
1 parent 22e6606 commit 47cc413

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,9 @@ DeviceDelegateOculusVR::EnterVR(const crow::BrowserEGLContext& aEGLContext) {
12721272
return;
12731273
}
12741274

1275-
m.clearColorSwapChain = m.CreateClearColorSwapChain(800, 450);
1275+
if (!m.clearColorSwapChain) {
1276+
m.clearColorSwapChain = m.CreateClearColorSwapChain(800, 450);
1277+
}
12761278

12771279
vrb::RenderContextPtr render = m.context.lock();
12781280
for (int i = 0; i < VRAPI_EYE_COUNT; ++i) {

0 commit comments

Comments
 (0)