diff options
| author | Mitchell Hashimoto <m@mitchellh.com> | 2025-07-18 10:42:23 -0700 |
|---|---|---|
| committer | Mitchell Hashimoto <m@mitchellh.com> | 2025-07-18 11:42:44 -0700 |
| commit | 7c9e913ca9f7770154add8ed4d53e91504bb904d (patch) | |
| tree | ebcf1378173009b53ce1091f948c36e3b37fffed /src/renderer/OpenGL.zig | |
| parent | 9f2ff0cb9c38693ffa37350f58db6045c4be0d9a (diff) | |
apprt/gtk-ng: hook up surface initialization
Diffstat (limited to 'src/renderer/OpenGL.zig')
| -rw-r--r-- | src/renderer/OpenGL.zig | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/renderer/OpenGL.zig b/src/renderer/OpenGL.zig index 882d6fc03..908e1c828 100644 --- a/src/renderer/OpenGL.zig +++ b/src/renderer/OpenGL.zig @@ -165,7 +165,9 @@ pub fn surfaceInit(surface: *apprt.Surface) !void { else => @compileError("unsupported app runtime for OpenGL"), // GTK uses global OpenGL context so we load from null. - apprt.gtk => try prepareContext(null), + apprt.gtk, + apprt.gtk_ng, + => try prepareContext(null), apprt.embedded => { // TODO(mitchellh): this does nothing today to allow libghostty @@ -199,7 +201,7 @@ pub fn threadEnter(self: *const OpenGL, surface: *apprt.Surface) !void { switch (apprt.runtime) { else => @compileError("unsupported app runtime for OpenGL"), - apprt.gtk => { + apprt.gtk, apprt.gtk_ng => { // GTK doesn't support threaded OpenGL operations as far as I can // tell, so we use the renderer thread to setup all the state // but then do the actual draws and texture syncs and all that @@ -221,7 +223,7 @@ pub fn threadExit(self: *const OpenGL) void { switch (apprt.runtime) { else => @compileError("unsupported app runtime for OpenGL"), - apprt.gtk => { + apprt.gtk, apprt.gtk_ng => { // We don't need to do any unloading for GTK because we may // be sharing the global bindings with other windows. }, @@ -236,7 +238,7 @@ pub fn displayRealized(self: *const OpenGL) void { _ = self; switch (apprt.runtime) { - apprt.gtk => prepareContext(null) catch |err| { + apprt.gtk, apprt.gtk_ng => prepareContext(null) catch |err| { log.warn( "Error preparing GL context in displayRealized, err={}", .{err}, |
