diff --git a/client/render/imgui_impl.cpp b/client/render/imgui_impl.cpp index 51cd070e..31a15ffb 100644 --- a/client/render/imgui_impl.cpp +++ b/client/render/imgui_impl.cpp @@ -845,7 +845,7 @@ std::vector> imgui_context::end_frame() application::haptic_start(haptic_output, XR_NULL_PATH, 10'000'000, 1000, 1); } - vk::Image destination = swapchain.images()[image_index]; + vk::Image destination = swapchain.image(image_index); ImGui::SetCurrentContext(context); ImPlot::SetCurrentContext(plot_context); diff --git a/client/scene.cpp b/client/scene.cpp index c9f59ac8..6237d258 100644 --- a/client/scene.cpp +++ b/client/scene.cpp @@ -166,7 +166,7 @@ void scene::render_world( xr::swapchain & color_swapchain = get_swapchain(swapchain_format, width, height, 1, views.size()); int color_image_index = color_swapchain.acquire(); - vk::Image color_image = color_swapchain.images()[color_image_index]; + vk::Image color_image = color_swapchain.image(color_image_index); color_swapchain.wait(); return {color_swapchain, color_image}; }(); @@ -177,7 +177,7 @@ void scene::render_world( xr::swapchain & depth_swapchain = get_swapchain(depth_format, width, height, 1, views.size()); int depth_image_index = depth_swapchain.acquire(); - vk::Image depth_image = depth_swapchain.images()[depth_image_index]; + vk::Image depth_image = depth_swapchain.image(depth_image_index); depth_swapchain.wait(); return {depth_swapchain, depth_image}; } diff --git a/client/xr/swapchain.h b/client/xr/swapchain.h index c02ab877..5c9b8ec5 100644 --- a/client/xr/swapchain.h +++ b/client/xr/swapchain.h @@ -75,6 +75,10 @@ public: { return images_; } + vk::Image image(size_t i) const + { + return images_[i]; + } vk::Format format() const { return format_;