Backends: OpenGL3: Fixed embedded loader multiple init/shutdown cycles broken on some platforms. (#8792, #9112)
diff --git a/backends/imgui_impl_opengl3.cpp b/backends/imgui_impl_opengl3.cpp
index 3e0e265..9b303ac 100644
--- a/backends/imgui_impl_opengl3.cpp
+++ b/backends/imgui_impl_opengl3.cpp
@@ -23,6 +23,7 @@
 
 // CHANGELOG
 // (minor and older changes stripped away, please see git history for details)
+//  2025-12-11: OpenGL: Fixed embedded loader multiple init/shutdown cycles broken on some platforms. (#8792, #9112)
 //  2025-09-18: Call platform_io.ClearRendererHandlers() on shutdown.
 //  2025-07-22: OpenGL: Add and call embedded loader shutdown during ImGui_ImplOpenGL3_Shutdown() to facilitate multiple init/shutdown cycles in same process. (#8792)
 //  2025-07-15: OpenGL: Set GL_UNPACK_ALIGNMENT to 1 before updating textures (#8802) + restore non-WebGL/ES update path that doesn't require a CPU-side copy.
diff --git a/backends/imgui_impl_opengl3_loader.h b/backends/imgui_impl_opengl3_loader.h
index 2c80cc5..2c48584 100644
--- a/backends/imgui_impl_opengl3_loader.h
+++ b/backends/imgui_impl_opengl3_loader.h
@@ -836,6 +836,7 @@
 }
 
 static void load_procs(GL3WGetProcAddressProc proc);
+static void clear_procs();
 
 int imgl3wInit(void)
 {
@@ -855,6 +856,7 @@
 void imgl3wShutdown(void)
 {
     close_libgl();
+    clear_procs();
 }
 
 int imgl3wIsSupported(int major, int minor)
@@ -943,6 +945,13 @@
         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
diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt
index faf1ebb..8c82d6a 100644
--- a/docs/CHANGELOG.txt
+++ b/docs/CHANGELOG.txt
@@ -98,6 +98,8 @@
     Lowers overhead for very high framerates (e.g. 10k+ FPS). [@maxliani]
   - GLFW: Added IMGUI_IMPL_GLFW_DISABLE_X11 / IMGUI_IMPL_GLFW_DISABLE_WAYLAND to
     forcefully disable either. (#9109, #9116)
+  - OpenGL3: Fixed embedded loader multiple init/shutdown cycles broken on some
+    platforms. (#8792, #9112)
   - SDL_GPU3: macOS version can use MSL shaders in order to support macOS 10.14+
     (vs Metallib shaders requiring macOS 14+). Requires application calling
     SDL_CreateGPUDevice() with SDL_GPU_SHADERFORMAT_MSL. (#9076) [@Niminem]