glfw: assert initialized in proc address getter functions
This commit is contained in:
parent
43b2502e3a
commit
da392d89a7
2 changed files with 2 additions and 2 deletions
|
|
@ -182,7 +182,7 @@ pub const GLProc = fn () callconv(.C) void;
|
|||
///
|
||||
/// see also: context_glext, glfwExtensionSupported
|
||||
pub inline fn getProcAddress(proc_name: [*:0]const u8) ?GLProc {
|
||||
// TODO: Do we call 'internal_debug.assertInitialized()' here?
|
||||
internal_debug.assertInitialized();
|
||||
const proc_address = c.glfwGetProcAddress(proc_name);
|
||||
getError() catch |err| @panic(@errorName(err));
|
||||
if (proc_address) |addr| return addr;
|
||||
|
|
|
|||
|
|
@ -111,7 +111,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: [*:0]const u8) callconv(.C) ?VKProc {
|
||||
// TODO: Do we call 'internal_debug.assertInitialized()' here?
|
||||
internal_debug.assertInitialized();
|
||||
const proc_address = c.glfwGetInstanceProcAddress(if (vk_instance) |v| @ptrCast(c.VkInstance, v) else null, proc_name);
|
||||
getError() catch |err| @panic(@errorName(err));
|
||||
if (proc_address) |addr| return addr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue