glfw: improve panic message for glfw.getInstanceProcAddress
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
ac4bfe5e0b
commit
ed10bebf99
1 changed files with 1 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ pub const VKProc = fn () callconv(.C) void;
|
|||
/// @thread_safety This function may be called from any thread.
|
||||
pub fn getInstanceProcAddress(vk_instance: ?*opaque {}, proc_name: [*c]const u8) callconv(.C) ?VKProc {
|
||||
const proc_address = c.glfwGetInstanceProcAddress(if (vk_instance) |v| @ptrCast(c.VkInstance, v) else null, proc_name);
|
||||
getError() catch @panic("glfw.getInstanceProcAddress failed, not initialized or Vulkan API unavailable");
|
||||
getError() catch |err| @panic(@errorName(err));
|
||||
if (proc_address) |addr| return addr;
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue