diff --git a/src/renderer/OpenGL.zig b/src/renderer/OpenGL.zig index 235a34841..fc4cbbee2 100644 --- a/src/renderer/OpenGL.zig +++ b/src/renderer/OpenGL.zig @@ -532,6 +532,12 @@ pub fn surfaceInit(surface: *apprt.Surface) !void { pub fn finalizeSurfaceInit(self: *const OpenGL, surface: *apprt.Surface) !void { _ = self; _ = surface; + + // For GLFW, we grabbed the OpenGL context in surfaceInit and we + // need to release it before we start the renderer thread. + if (apprt.runtime == apprt.glfw) { + glfw.makeContextCurrent(null); + } } /// This is called if this renderer runs DevMode.