1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-09 23:54:20 +00:00

Backends: OpenGL3: Fixed embedded loader multiple init/shutdown cycles broken on some platforms. (#8792, #9112)

This commit is contained in:
ocornut 2025-12-11 18:28:23 +01:00
parent 0d2dd30ee9
commit bd6f48fe20
3 changed files with 12 additions and 0 deletions

View file

@ -836,6 +836,7 @@ static int parse_version(void)
}
static void load_procs(GL3WGetProcAddressProc proc);
static void clear_procs();
int imgl3wInit(void)
{
@ -855,6 +856,7 @@ int imgl3wInit2(GL3WGetProcAddressProc proc)
void imgl3wShutdown(void)
{
close_libgl();
clear_procs();
}
int imgl3wIsSupported(int major, int minor)
@ -943,6 +945,13 @@ static void load_procs(GL3WGetProcAddressProc proc)
imgl3wProcs.ptr[i] = proc(proc_names[i]);
}
static void clear_procs()
{
size_t i;
for (i = 0; i < GL3W_ARRAY_SIZE(proc_names); i++)
imgl3wProcs.ptr[i] = nullptr;
}
#ifdef __cplusplus
}
#endif