mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 21:51:08 +00:00
Add support for GDK_GL=texture-rectangles
This allows us to test our support for GL_ARB_texture_rectangle
This commit is contained in:
parent
90a5fa80af
commit
650c9f3b7e
@ -140,6 +140,7 @@ static const GDebugKey gdk_gl_keys[] = {
|
||||
{"software-draw", GDK_GL_FLAGS_SOFTWARE_DRAW_GL | GDK_GL_FLAGS_SOFTWARE_DRAW_SURFACE},
|
||||
{"software-draw-gl", GDK_GL_FLAGS_SOFTWARE_DRAW_GL},
|
||||
{"software-draw-surface", GDK_GL_FLAGS_SOFTWARE_DRAW_SURFACE},
|
||||
{"texture-rectangle", GDK_GL_FLAGS_TEXTURE_RECTANGLE},
|
||||
};
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
|
@ -359,7 +359,9 @@ gdk_gl_context_realize (GdkGLContext *context)
|
||||
has_npot = epoxy_has_gl_extension ("GL_ARB_texture_non_power_of_two");
|
||||
has_texture_rectangle = epoxy_has_gl_extension ("GL_ARB_texture_rectangle");
|
||||
|
||||
if (has_npot)
|
||||
if (_gdk_gl_flags & GDK_GL_FLAGS_TEXTURE_RECTANGLE)
|
||||
priv->use_texture_rectangle = TRUE;
|
||||
else if (has_npot)
|
||||
priv->use_texture_rectangle = FALSE;
|
||||
else if (has_texture_rectangle)
|
||||
priv->use_texture_rectangle = TRUE;
|
||||
|
@ -93,6 +93,7 @@ typedef enum {
|
||||
GDK_GL_FLAGS_ALWAYS = 1 << 1,
|
||||
GDK_GL_FLAGS_SOFTWARE_DRAW_GL = 1 << 2,
|
||||
GDK_GL_FLAGS_SOFTWARE_DRAW_SURFACE = 1 << 3,
|
||||
GDK_GL_FLAGS_TEXTURE_RECTANGLE = 1 << 4,
|
||||
} GdkGLFlags;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user