summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-09-25 21:59:33 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-09-25 21:59:33 -0400
commitd6912a6791f178da16f2877d5885e9aaf3cf29b6 (patch)
tree77fe030a30246ae14e9a266cb69d0551b8ee2875
parentdb4b7e3d11ceb8b07a155f73043dde437b84eb03 (diff)
downloadgtk+-fix-texture-upload-more.tar.gz
More texture upload fixesfix-texture-upload-more
In some cases, with bpp == 3 and a rowstride that is divisible by 4, we were passing invalid parameters to GL. Fixes: #3198
-rw-r--r--gdk/gdkglcontext.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index 7f544dc003..d4359844a3 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -299,13 +299,11 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
else if ((!priv->use_es ||
(priv->use_es && (priv->gl_version >= 30 || priv->has_unpack_subimage))))
{
- glPixelStorei (GL_UNPACK_ALIGNMENT, bpp);
glPixelStorei (GL_UNPACK_ROW_LENGTH, stride / bpp);
glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, gl_format, gl_type, data);
glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
- glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
}
else
{