Cargo fmt, minor fix
This commit is contained in:
parent
e60ea4d131
commit
57d8a971c6
1 changed files with 9 additions and 1 deletions
10
src/main.rs
10
src/main.rs
|
@ -99,7 +99,11 @@ impl VulkanApp {
|
||||||
};
|
};
|
||||||
|
|
||||||
let vk_result = unsafe {
|
let vk_result = unsafe {
|
||||||
ffi_vk::vkCreateInstance(std::ptr::addr_of!(create_info), std::ptr::null(), std::ptr::addr_of_mut!(self.vk_instance))
|
ffi_vk::vkCreateInstance(
|
||||||
|
std::ptr::addr_of!(create_info),
|
||||||
|
std::ptr::null(),
|
||||||
|
std::ptr::addr_of_mut!(self.vk_instance),
|
||||||
|
)
|
||||||
};
|
};
|
||||||
|
|
||||||
if vk_result != ffi_vk::VkResult_VK_SUCCESS {
|
if vk_result != ffi_vk::VkResult_VK_SUCCESS {
|
||||||
|
@ -112,6 +116,10 @@ impl VulkanApp {
|
||||||
panic!("ERROR: Cannot execute main loop if window is null!");
|
panic!("ERROR: Cannot execute main loop if window is null!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if self.vk_instance.is_null() {
|
||||||
|
panic!("ERROR: Cannot execute main loop if vk_instance is null!");
|
||||||
|
}
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
unsafe {
|
unsafe {
|
||||||
if ffi_glfw::glfwWindowShouldClose(self.window) != 0 {
|
if ffi_glfw::glfwWindowShouldClose(self.window) != 0 {
|
||||||
|
|
Loading…
Reference in a new issue