glfw: assert initialized in proc address getter functions

This commit is contained in:
InKryption 2021-11-22 13:11:54 +01:00 committed by Stephen Gutekanst
parent 43b2502e3a
commit da392d89a7
2 changed files with 2 additions and 2 deletions

View file

@ -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;