mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 06:10:15 +00:00
x11/gl: Do not call glEnable/glDisable with GL_TEXTURE_2D
These are fixed pipeline functions, and Mesa will warn (if debugging messages are enabled). At best, they are poinless calls.
This commit is contained in:
parent
aaff396e48
commit
6bd7526ee7
@ -461,7 +461,10 @@ gdk_x11_gl_context_texture_from_surface (GdkGLContext *paint_context,
|
||||
|
||||
glGenTextures (1, &texture_id);
|
||||
glBindTexture (target, texture_id);
|
||||
glEnable (target);
|
||||
|
||||
/* glEnable(GL_TEXTURE_2D) is deprecated */
|
||||
if (target != GL_TEXTURE_2D)
|
||||
glEnable (target);
|
||||
|
||||
glTexParameteri (target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri (target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
@ -526,7 +529,9 @@ gdk_x11_gl_context_texture_from_surface (GdkGLContext *paint_context,
|
||||
glXReleaseTexImageEXT (glx_pixmap->display, glx_pixmap->drawable,
|
||||
GLX_FRONT_LEFT_EXT);
|
||||
|
||||
glDisable (target);
|
||||
if (target != GL_TEXTURE_2D)
|
||||
glDisable (target);
|
||||
|
||||
glDeleteTextures (1, &texture_id);
|
||||
|
||||
glx_pixmap_destroy(glx_pixmap);
|
||||
|
Loading…
Reference in New Issue
Block a user