GNOME Bugzilla – Bug 743139
GDK_GL_PROFILE_3_2_CORE creates a OpenGL 3.0 context with X11
Last modified: 2015-01-18 19:13:15 UTC
Created attachment 294807 [details] Patch When you request an OpenGL 3.2 core profile context using gtk_gl_area_set_profile with GDK_GL_PROFILE_3_2_CORE, the profile you get is not core profile when using the X11 backend. In gdk/x11/gdkglcontext-x11.c, function create_gl3_context, begins with this comment: > /* There are no profiles before OpenGL 3.2. > * > * The GLX_ARB_create_context_profile spec says: > * > * If the requested OpenGL version is less than 3.2, > * GLX_CONTEXT_PROFILE_MASK_ARB is ignored and the functionality > * of the context is determined solely by the requested version. > * > * Which means we can ask for the CORE_PROFILE_BIT without asking for > * a 3.2 version. > */ This conclusion is incorrect. The default value for GLX_CONTEXT_MAJOR_VERSION_ARB is 1 and the default for GLX_CONTEXT_MINOR_VERSION_ARB is 0, which is less than 3.2, so the value of GLX_CONTEXT_PROFILE_MASK_ARB which the function sets to GLX_CONTEXT_CORE_PROFILE_BIT_ARB is ignored as per the quoted part of the spec. The created context therefore has to be compatible with OpenGL 1.0. A 3.2 core profile context is not compatible with GL 1.0, as some deprecated functionality is removed, so at best, when using mesa, a GL 3.0 context is created. create_gl3_context should request the desired GL version explicitly. See the attached patch. However, when the patch is applied, I get this error from libepoxy when using a core profile: > No provider of glBindRenderbufferEXT found. Requires one of: > GL extension "GL_EXT_framebuffer_object" it then aborts. This is a different bug. Mesa does not provide GL_EXT_framebuffer_object in core profile contexts. It should use GL_ARB_framebuffer_object instead, which is present in OpenGL 3.0. Gtk+ version: git cf277fabb5bb28f0a31b281f068250603c3900d6 built with jhbuild System: Fedora 21 x86_64
*** This bug has been marked as a duplicate of bug 742953 ***