macosglcontext: Do not rely on default from get_required_version
authorPablo Correa Gómez <ablocorrea@hotmail.com>
Fri, 27 May 2022 23:01:19 +0000 (01:01 +0200)
committerPablo Correa Gómez <ablocorrea@hotmail.com>
Sat, 4 Jun 2022 18:48:40 +0000 (20:48 +0200)
get_required_version cannot warranty to return any default. Instead,
fetch the user requisites clipped by the requirements in our backend.

gdk/macos/gdkmacosglcontext.c

index ff7ae975c81582bf1a5fe9788d7fe708aec7aa5f..069d138b83ff2c6a523ef41698852ff9da4b3f42 100644 (file)
@@ -378,7 +378,10 @@ gdk_macos_gl_context_real_realize (GdkGLContext  *context,
 
   existing = CGLGetCurrentContext ();
 
-  gdk_gl_context_get_required_version (context, &major, &minor);
+  gdk_gl_context_get_clipped_version (context,
+                                      GDK_GL_MIN_GL_VERSION_MAJOR,
+                                      GDK_GL_MIN_GL_VERSION_MINOR,
+                                      &major, &minor);
 
   display = gdk_gl_context_get_display (context);
   shared = gdk_display_get_gl_context (display);