mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 18:30:08 +00:00
gltexture: Fix conditions for glGetTexImage() call
The conditions were inverted, plus we failed to limit this call to non-GLES.
This commit is contained in:
parent
79d2a14061
commit
c7e36bcf22
@ -155,8 +155,9 @@ gdk_gl_texture_do_download (gpointer texture_,
|
||||
|
||||
expected_stride = texture->width * gdk_memory_format_bytes_per_pixel (download->format);
|
||||
|
||||
if (download->stride != expected_stride &&
|
||||
!gdk_memory_format_gl_format (download->format, gdk_gl_context_get_use_es (self->context), &gl_internal_format, &gl_format, &gl_type))
|
||||
if (download->stride == expected_stride &&
|
||||
!gdk_gl_context_get_use_es (self->context) &&
|
||||
gdk_memory_format_gl_format (download->format, TRUE, &gl_internal_format, &gl_format, &gl_type))
|
||||
{
|
||||
glGetTexImage (GL_TEXTURE_2D,
|
||||
0,
|
||||
|
Loading…
Reference in New Issue
Block a user