From 4f3c33af3adf2dedfe90eaa9a7cbe6209762b20c Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Sat, 13 Dec 2014 21:47:38 -0500 Subject: [PATCH] glmemory: Handle custom stride with OPENGL3 https://bugzilla.gnome.org/show_bug.cgi?id=740900 --- gst-libs/gst/gl/gstglmemory.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gst-libs/gst/gl/gstglmemory.c b/gst-libs/gst/gl/gstglmemory.c index ab4e0d8656..600f78c6aa 100644 --- a/gst-libs/gst/gl/gstglmemory.c +++ b/gst-libs/gst/gl/gstglmemory.c @@ -409,7 +409,8 @@ _upload_memory (GstGLContext * context, GstGLMemory * gl_mem) gl_format = _gst_gl_format_from_gl_texture_type (gl_mem->tex_type); - if (USING_OPENGL (context) || USING_GLES3 (context)) { + if (USING_OPENGL (context) || USING_GLES3 (context) + || USING_OPENGL3 (context)) { gl->PixelStorei (GL_UNPACK_ROW_LENGTH, gl_mem->unpack_length); } else if (USING_GLES2 (context)) { gl->PixelStorei (GL_UNPACK_ALIGNMENT, gl_mem->unpack_length); @@ -451,7 +452,8 @@ _calculate_unpack_length (GstGLMemory * gl_mem) return; } - if (USING_OPENGL (gl_mem->context) || USING_GLES3 (gl_mem->context)) { + if (USING_OPENGL (gl_mem->context) || USING_GLES3 (gl_mem->context) + || USING_OPENGL3 (gl_mem->context)) { gl_mem->unpack_length = GL_MEM_STRIDE (gl_mem) / n_gl_bytes; } else if (USING_GLES2 (gl_mem->context)) { guint j = 8;