summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-09-25 13:15:54 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-09-25 13:16:47 -0400
commit12f05e80aa40891ce3b7dab9d11089542f75f5d9 (patch)
treecaf531ddc57f89ab0a720de633d68d7acbbec79e
parentc9f6a9f7c523bf6b59aa7fb4cc07092bbaf35378 (diff)
downloadgtk+-12f05e80aa40891ce3b7dab9d11089542f75f5d9.tar.gz
gl: Fix RGB uploads
I don't really know what to say, other than: OpenGL is terrible Fixes: #3194
-rw-r--r--gdk/gdkglcontext.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index f9512b0343..5614b2ce47 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -291,6 +291,8 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
*/
if (stride == width * bpp)
{
+ glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
+
glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, gl_format, gl_type, data);
}
else if ((!priv->use_es ||