Refactor VK layer handling and add logging improvements

Refactored VK layer handling by changing return type of `use_layers` to `Vec<CString>`, adjusting subsequent usage of layers. Implemented `Display` for `VkPhysicalDevice` for better logging. Enhanced application initialization with detailed window attributes. Transitioned to using `log::info` for consistent logging.
This commit is contained in:
Florian RICHER 2024-11-10 11:27:45 +01:00
parent f52832e0e5
commit 4048937a6c
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
5 changed files with 43 additions and 19 deletions

View file

@ -1,4 +1,6 @@
use std::fmt::{Display, Formatter};
use ash::vk;
use crate::display::App;
pub struct VkPhysicalDevice {
// Vulkan properties
@ -48,4 +50,11 @@ impl VkPhysicalDevice {
priority
}
}
}
impl Display for VkPhysicalDevice {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "\tNom: {:?}, Priorité: {}", self.properties.device_name_as_c_str().unwrap_or_default(), self.priority())
}
}