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

Do not recreate clearColorSwapChain if it already exists #3391

Merged
merged 1 commit into from
May 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/src/oculusvr/cpp/DeviceDelegateOculusVR.cpp
Original file line number Diff line number Diff line change
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