[][src]Macro nobs_vk::vk_check

macro_rules! vk_check {
    ($fn:expr) => { ... };
}

Wraps a call to a vulkan command and converts it's returned error code with make_result.

Prints debug information to std::out with the file and line number of the vulkan command. This macro may only be used with vulkan commands that return a nobs_vk::Result

Example

#[macro_use] extern crate nobs_vk as vk;
//...
match vk_check!(vk::EnumerateInstanceVersion(&mut inst_ver)) {
  Err(e) => println!("EnumerateInstanceVersion returned with: {:?}", e),
  Ok(e) => println!("EnumerateInstanceVersion returned with: {:?}", e),
}