[gtk/wip/otte/for-master: 2/6] gltexture: Fix conditions for glGetTexImage() call
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/for-master: 2/6] gltexture: Fix conditions for glGetTexImage() call
- Date: Sun, 17 Oct 2021 20:29:26 +0000 (UTC)
commit c7e36bcf226643fc37b7de37cf9f00138b255384
Author: Benjamin Otte <otte redhat com>
Date: Sun Oct 17 06:54:38 2021 +0200
gltexture: Fix conditions for glGetTexImage() call
The conditions were inverted, plus we failed to limit this call to
non-GLES.
gdk/gdkgltexture.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkgltexture.c b/gdk/gdkgltexture.c
index b20534801a..867fd538cd 100644
--- a/gdk/gdkgltexture.c
+++ b/gdk/gdkgltexture.c
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]