diff --git a/client/application.h b/client/application.h index 58df127e..076aa480 100644 --- a/client/application.h +++ b/client/application.h @@ -348,11 +348,6 @@ public: return instance().xr_instance.now(); } - static uint32_t queue_family_index() - { - return instance().vk_queue_family_index; - } - static thread_safe & get_queue() { return instance().vk_queue; diff --git a/client/render/imgui_impl.cpp b/client/render/imgui_impl.cpp index 1f762af9..098cac42 100644 --- a/client/render/imgui_impl.cpp +++ b/client/render/imgui_impl.cpp @@ -345,9 +345,9 @@ imgui_context::imgui_context( ImGui_ImplVulkan_InitInfo init_info = { .Instance = *application::get_vulkan_instance(), - .PhysicalDevice = *application::get_physical_device(), - .Device = *application::get_device(), - .QueueFamily = application::queue_family_index(), + .PhysicalDevice = *physical_device, + .Device = *device, + .QueueFamily = queue_family_index, .Queue = *queue.get_unsafe(), .RenderPass = *renderpass, .MinImageCount = 2, diff --git a/client/scene.cpp b/client/scene.cpp index 70474d3a..684922ee 100644 --- a/client/scene.cpp +++ b/client/scene.cpp @@ -441,7 +441,7 @@ std::pair scene::load_gltf(const std::filesyst node.layer_mask = layer_mask; assert(renderer); - scene_loader loader(device, physical_device, queue, application::queue_family_index(), renderer->get_default_material()); + scene_loader loader(device, physical_device, queue, queue_family_index, renderer->get_default_material()); loader.add_prefab(world, loader(path), entity); diff --git a/client/scenes/lobby.cpp b/client/scenes/lobby.cpp index 8e722530..2b9154ab 100644 --- a/client/scenes/lobby.cpp +++ b/client/scenes/lobby.cpp @@ -798,7 +798,7 @@ void scenes::lobby::on_focused() // assert(std::ranges::all_of(views, [height](const XrViewConfigurationView & view) { return view.recommendedImageRectHeight == height; })); renderer.emplace(device, physical_device, queue, commandpool); - loader.emplace(device, physical_device, queue, application::queue_family_index(), renderer->get_default_material()); + loader.emplace(device, physical_device, queue, queue_family_index, renderer->get_default_material()); lobby_entity = load_gltf("ground.gltf", layer_lobby).first; diff --git a/client/scenes/stream.cpp b/client/scenes/stream.cpp index 636ef020..267246de 100644 --- a/client/scenes/stream.cpp +++ b/client/scenes/stream.cpp @@ -399,7 +399,7 @@ void scenes::stream::on_focused() height = views[0].recommendedImageRectHeight; renderer.emplace(device, physical_device, queue, commandpool); - loader.emplace(device, physical_device, queue, application::queue_family_index(), renderer->get_default_material()); + loader.emplace(device, physical_device, queue, queue_family_index, renderer->get_default_material()); std::string profile = controller_name(); input.emplace(