Minor refactorings
This commit is contained in:
parent
3b9a9bcd37
commit
29c8a08720
1 changed files with 4 additions and 4 deletions
|
@ -280,8 +280,8 @@ impl VulkanApp {
|
||||||
if ENABLE_VALIDATION_LAYERS {
|
if ENABLE_VALIDATION_LAYERS {
|
||||||
let exts_slice: &[*const std::ffi::c_char] =
|
let exts_slice: &[*const std::ffi::c_char] =
|
||||||
unsafe { std::slice::from_raw_parts(exts, ext_count as usize) };
|
unsafe { std::slice::from_raw_parts(exts, ext_count as usize) };
|
||||||
for i in 0..(ext_count as usize) {
|
for ext in exts_slice {
|
||||||
exts_with_validation.push(exts_slice[i]);
|
exts_with_validation.push(*ext);
|
||||||
}
|
}
|
||||||
exts_with_validation.push(validation_string);
|
exts_with_validation.push(validation_string);
|
||||||
}
|
}
|
||||||
|
@ -501,8 +501,8 @@ impl VulkanApp {
|
||||||
break 'outer;
|
break 'outer;
|
||||||
}
|
}
|
||||||
ffi::glfwPollEvents();
|
ffi::glfwPollEvents();
|
||||||
self.draw_frame().unwrap();
|
|
||||||
}
|
}
|
||||||
|
self.draw_frame().unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -699,7 +699,7 @@ impl VulkanApp {
|
||||||
|
|
||||||
fn choose_swap_surface_format(
|
fn choose_swap_surface_format(
|
||||||
&self,
|
&self,
|
||||||
available_formats: &Vec<ffi::VkSurfaceFormatKHR>,
|
available_formats: &[ffi::VkSurfaceFormatKHR],
|
||||||
) -> Option<usize> {
|
) -> Option<usize> {
|
||||||
if available_formats.is_empty() {
|
if available_formats.is_empty() {
|
||||||
return None;
|
return None;
|
||||||
|
|
Loading…
Reference in a new issue