| 1687 | |
| 1688 | template <vkb::BindingType bindingType> |
| 1689 | inline void VulkanSample<bindingType>::update_debug_window() |
| 1690 | { |
| 1691 | auto driver_version = device->get_gpu().get_driver_version(); |
| 1692 | std::string driver_version_str = fmt::format("major: {} minor: {} patch: {}", driver_version.major, driver_version.minor, driver_version.patch); |
| 1693 | |
| 1694 | get_debug_info().template insert<field::Static, std::string>("driver_version", driver_version_str); |
| 1695 | get_debug_info().template insert<field::Static, std::string>("resolution", |
| 1696 | to_string(static_cast<VkExtent2D const &>(render_context->get_swapchain().get_extent()))); |
| 1697 | get_debug_info().template insert<field::Static, std::string>("surface_format", |
| 1698 | to_string(render_context->get_swapchain().get_format()) + " (" + |
| 1699 | to_string(vkb::common::get_bits_per_pixel(render_context->get_swapchain().get_format())) + |
| 1700 | "bpp)"); |
| 1701 | |
| 1702 | if (scene != nullptr) |
| 1703 | { |
| 1704 | get_debug_info().template insert<field::Static, uint32_t>("mesh_count", to_u32(scene->get_components<sg::SubMesh>().size())); |
| 1705 | get_debug_info().template insert<field::Static, uint32_t>("texture_count", to_u32(scene->get_components<sg::Texture>().size())); |
| 1706 | |
| 1707 | if (auto camera = scene->get_components<vkb::sg::Camera>()[0]) |
| 1708 | { |
| 1709 | if (auto camera_node = camera->get_node()) |
| 1710 | { |
| 1711 | const glm::vec3 &pos = camera_node->get_transform().get_translation(); |
| 1712 | get_debug_info().template insert<field::Vector, float>("camera_pos", pos.x, pos.y, pos.z); |
| 1713 | } |
| 1714 | } |
| 1715 | } |
| 1716 | } |
| 1717 | |
| 1718 | template <vkb::BindingType bindingType> |
| 1719 | inline void VulkanSample<bindingType>::update_gui(float delta_time) |
nothing calls this directly
no test coverage detected