[gtk+/wip/ebassi/gl-context-realize] x11/gl: Ensure we use the 3.2 core profile



commit 5043eeaf3e3047d10215ad3cb08b5d53f03e15b9
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Feb 9 15:55:08 2015 +0000

    x11/gl: Ensure we use the 3.2 core profile
    
    Drop the dead code for the legacy profile, and return an error when
    realizing if the profile is incorrect.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=741946

 gdk/x11/gdkglcontext-x11.c |   23 ++++-------------------
 1 files changed, 4 insertions(+), 19 deletions(-)
---
diff --git a/gdk/x11/gdkglcontext-x11.c b/gdk/x11/gdkglcontext-x11.c
index cde1e09..2251d15 100644
--- a/gdk/x11/gdkglcontext-x11.c
+++ b/gdk/x11/gdkglcontext-x11.c
@@ -571,23 +571,6 @@ create_gl3_context (GdkDisplay   *display,
                                      attrib_list);
 }
 
-static GLXContext
-create_gl_context (GdkDisplay   *display,
-                   GLXFBConfig   config,
-                   GdkGLContext *share)
-{
-  GdkX11GLContext *share_x11 = NULL;
-
-  if (share != NULL)
-    share_x11 = GDK_X11_GL_CONTEXT (share);
-
-  return glXCreateNewContext (gdk_x11_display_get_xdisplay (display),
-                              config,
-                              GLX_RGBA_TYPE,
-                              share_x11 != NULL ? share_x11->glx_context : NULL,
-                              True);
-}
-
 static gboolean
 gdk_x11_gl_context_realize (GdkGLContext  *context,
                             GError       **error)
@@ -640,8 +623,10 @@ gdk_x11_gl_context_realize (GdkGLContext  *context,
     }
   else
     {
-      GDK_NOTE (OPENGL, g_print ("Creating legacy GLX context\n"));
-      context_x11->glx_context = create_gl_context (display, context_x11->glx_config, share);
+      g_set_error_literal (error, GDK_GL_ERROR,
+                           GDK_GL_ERROR_UNSUPPORTED_PROFILE,
+                           _("Unsupported profile for a GL context"));
+      return FALSE;
     }
 
   if (context_x11->glx_context == NULL)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]