mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 17:50:36 +00:00
glmemory: unset GL_UNPACK_ROW_LENGTH in opengl3
If the user uploads their own texture without setting the unpack length, then then the result will have the appearance of stride mismanagement due to an incorrect row length.
This commit is contained in:
parent
df7016553e
commit
a9cf8476ea
1 changed files with 2 additions and 1 deletions
|
@ -522,7 +522,8 @@ gst_gl_memory_texsubimage (GstGLMemory * gl_mem, gpointer read_pointer)
|
||||||
gst_gl_query_end (GST_GL_BASE_MEMORY_CAST (gl_mem)->query);
|
gst_gl_query_end (GST_GL_BASE_MEMORY_CAST (gl_mem)->query);
|
||||||
|
|
||||||
/* Reset to default values */
|
/* Reset to default values */
|
||||||
if (USING_OPENGL (context) || USING_GLES3 (context)) {
|
if (USING_OPENGL (context) || USING_GLES3 (context)
|
||||||
|
|| USING_OPENGL3 (context)) {
|
||||||
gl->PixelStorei (GL_UNPACK_ROW_LENGTH, 0);
|
gl->PixelStorei (GL_UNPACK_ROW_LENGTH, 0);
|
||||||
} else if (USING_GLES2 (context)) {
|
} else if (USING_GLES2 (context)) {
|
||||||
gl->PixelStorei (GL_UNPACK_ALIGNMENT, 4);
|
gl->PixelStorei (GL_UNPACK_ALIGNMENT, 4);
|
||||||
|
|
Loading…
Reference in a new issue