mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
Control legacy GL context via environment variable
For testing purposes, we may want to force the creation of legacy GL contexts via an environment variable. https://bugzilla.gnome.org/show_bug.cgi?id=756142
This commit is contained in:
parent
18cae47e17
commit
105f1c9fd3
@ -144,6 +144,7 @@ static const GDebugKey gdk_gl_keys[] = {
|
||||
{"software-draw-gl", GDK_GL_SOFTWARE_DRAW_GL},
|
||||
{"software-draw-surface", GDK_GL_SOFTWARE_DRAW_SURFACE},
|
||||
{"texture-rectangle", GDK_GL_TEXTURE_RECTANGLE},
|
||||
{"legacy", GDK_GL_LEGACY},
|
||||
};
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
|
@ -99,7 +99,8 @@ typedef enum {
|
||||
GDK_GL_ALWAYS = 1 << 1,
|
||||
GDK_GL_SOFTWARE_DRAW_GL = 1 << 2,
|
||||
GDK_GL_SOFTWARE_DRAW_SURFACE = 1 << 3,
|
||||
GDK_GL_TEXTURE_RECTANGLE = 1 << 4
|
||||
GDK_GL_TEXTURE_RECTANGLE = 1 << 4,
|
||||
GDK_GL_LEGACY = 1 << 5
|
||||
} GdkGLFlags;
|
||||
|
||||
extern GList *_gdk_default_filters;
|
||||
|
@ -638,7 +638,8 @@ gdk_x11_gl_context_realize (GdkGLContext *context,
|
||||
compat_bit = gdk_gl_context_get_forward_compatible (context);
|
||||
|
||||
/* If there is no glXCreateContextAttribsARB() then we default to legacy */
|
||||
legacy_bit = !GDK_X11_DISPLAY (display)->has_glx_create_context;
|
||||
legacy_bit = !GDK_X11_DISPLAY (display)->has_glx_create_context ||
|
||||
(_gdk_gl_flags & GDK_GL_LEGACY) != 0;
|
||||
|
||||
/* We cannot share legacy contexts with core profile ones, so the
|
||||
* shared context is the one that decides if we're going to create
|
||||
|
Loading…
Reference in New Issue
Block a user