projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29867e7
)
gltexture: Use proper alignment for downloads
author
Matthias Clasen
<mclasen@redhat.com>
Wed, 31 May 2023 02:35:45 +0000
(22:35 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Wed, 31 May 2023 02:35:45 +0000
(22:35 -0400)
gdk/gdkgltexture.c
patch
|
blob
|
history
diff --git
a/gdk/gdkgltexture.c
b/gdk/gdkgltexture.c
index 6e72af54032384b9a64fd65ae54feff55ccf786c..d9d62190d9568432752a892a7a682d5ee10d41b7 100644
(file)
--- a/
gdk/gdkgltexture.c
+++ b/
gdk/gdkgltexture.c
@@
-204,6
+204,7
@@
gdk_gl_texture_do_download (GdkGLTexture *self,
gsize stride = texture->width * gdk_memory_format_bytes_per_pixel (format);
guchar *pixels = g_malloc_n (stride, texture->height);
+ glPixelStorei (GL_PACK_ALIGNMENT, 1);
glGetTexImage (GL_TEXTURE_2D,
0,
gl_format,
@@
-271,6
+272,7
@@
gdk_gl_texture_do_download (GdkGLTexture *self,
gsize stride = actual_bpp * texture->width;
guchar *pixels = g_malloc_n (stride, texture->height);
+ glPixelStorei (GL_PACK_ALIGNMENT, 1);
glReadPixels (0, 0,
texture->width, texture->height,
gl_read_format,