From c4393ece4c0a22127588737773fb51e5d66019ff Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 23 Feb 2023 19:14:12 -0800 Subject: [PATCH] gtk: make clear opengl requirements --- src/apprt/gtk.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/apprt/gtk.zig b/src/apprt/gtk.zig index 914a61eb5..26086c382 100644 --- a/src/apprt/gtk.zig +++ b/src/apprt/gtk.zig @@ -216,6 +216,10 @@ pub const Surface = struct { pub fn init(self: *Surface, app: *App, opts: Options) !void { const widget = @ptrCast(*c.GtkWidget, opts.gl_area); + c.gtk_gl_area_set_required_version(opts.gl_area, 3, 3); + c.gtk_gl_area_set_has_stencil_buffer(opts.gl_area, 0); + c.gtk_gl_area_set_has_depth_buffer(opts.gl_area, 0); + c.gtk_gl_area_set_use_es(opts.gl_area, 0); // Key event controller will tell us about raw keypress events. const ec_key = c.gtk_event_controller_key_new();