renderer/opengl: need to release OpenGL context with glfw

This commit is contained in:
Mitchell Hashimoto
2023-08-05 22:33:55 -07:00
parent 178fef7a90
commit 2065dd77d7

View File

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