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:
parent
f52832e0e5
commit
4048937a6c
5 changed files with 43 additions and 19 deletions
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue