diff --git a/client/render/imgui_impl.cpp b/client/render/imgui_impl.cpp index b4c499a1..53e63a22 100644 --- a/client/render/imgui_impl.cpp +++ b/client/render/imgui_impl.cpp @@ -458,7 +458,6 @@ void imgui_context::new_frame(XrTime display_time) XrCompositionLayerQuad imgui_context::end_frame() { vk::Image destination = swapchain.images()[image_index].image; - swapchain.release(); ImGui::SetCurrentContext(context); ImPlot::SetCurrentContext(plot_context); @@ -500,6 +499,8 @@ XrCompositionLayerQuad imgui_context::end_frame() .pCommandBuffers = &*cb, }, *fence); + swapchain.release(); + return XrCompositionLayerQuad{ .type = XR_TYPE_COMPOSITION_LAYER_QUAD, .layerFlags = XR_COMPOSITION_LAYER_BLEND_TEXTURE_SOURCE_ALPHA_BIT,