[gtk/fix-rgb-upload] gl: Fix RGB uploads
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-rgb-upload] gl: Fix RGB uploads
- Date: Fri, 25 Sep 2020 17:17:41 +0000 (UTC)
commit 12f05e80aa40891ce3b7dab9d11089542f75f5d9
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Sep 25 13:15:54 2020 -0400
gl: Fix RGB uploads
I don't really know what to say, other than:
OpenGL is terrible
Fixes: #3194
gdk/gdkglcontext.c | 2 ++
1 file changed, 2 insertions(+)
---
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 ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]