glmemory: Handle custom stride with OPENGL3

https://bugzilla.gnome.org/show_bug.cgi?id=740900
This commit is contained in:
Nicolas Dufresne 2014-12-13 21:47:38 -05:00 committed by Tim-Philipp Müller
parent fc09b8b93c
commit 197e8de6e6

View file

@ -409,7 +409,8 @@ _upload_memory (GstGLContext * context, GstGLMemory * gl_mem)
gl_format = _gst_gl_format_from_gl_texture_type (gl_mem->tex_type); 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); gl->PixelStorei (GL_UNPACK_ROW_LENGTH, gl_mem->unpack_length);
} else if (USING_GLES2 (context)) { } else if (USING_GLES2 (context)) {
gl->PixelStorei (GL_UNPACK_ALIGNMENT, gl_mem->unpack_length); gl->PixelStorei (GL_UNPACK_ALIGNMENT, gl_mem->unpack_length);
@ -451,7 +452,8 @@ _calculate_unpack_length (GstGLMemory * gl_mem)
return; 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; gl_mem->unpack_length = GL_MEM_STRIDE (gl_mem) / n_gl_bytes;
} else if (USING_GLES2 (gl_mem->context)) { } else if (USING_GLES2 (gl_mem->context)) {
guint j = 8; guint j = 8;