mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
glmemory: fixup GL_RGB565 usage when performing texsubimage
An additional change for the texsubimage use case on top of https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=c2b2c68beaddbea0ec4fe7b099507cc492f6dd7c https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=ea6bed111bab9b394d787f7760c6a3b953630d3a https://bugzilla.gnome.org/show_bug.cgi?id=783066 https://bugzilla.gnome.org/show_bug.cgi?id=792584
This commit is contained in:
parent
d4d1ae95d1
commit
e620cf32cf
1 changed files with 5 additions and 3 deletions
|
@ -525,10 +525,12 @@ gst_gl_memory_texsubimage (GstGLMemory * gl_mem, gpointer read_pointer)
|
||||||
gl = context->gl_vtable;
|
gl = context->gl_vtable;
|
||||||
|
|
||||||
gl_type = GL_UNSIGNED_BYTE;
|
gl_type = GL_UNSIGNED_BYTE;
|
||||||
if (gl_mem->tex_format == GST_GL_RGB565)
|
|
||||||
gl_type = GL_UNSIGNED_SHORT_5_6_5;
|
|
||||||
|
|
||||||
gl_format = gl_mem->tex_format;
|
gl_format = gl_mem->tex_format;
|
||||||
|
if (gl_mem->tex_format == GST_GL_RGB565) {
|
||||||
|
gl_format = GST_GL_RGB;
|
||||||
|
gl_type = GL_UNSIGNED_SHORT_5_6_5;
|
||||||
|
}
|
||||||
|
|
||||||
gl_target = gst_gl_texture_target_to_gl (gl_mem->tex_target);
|
gl_target = gst_gl_texture_target_to_gl (gl_mem->tex_target);
|
||||||
|
|
||||||
if (USING_OPENGL (context) || USING_GLES3 (context)
|
if (USING_OPENGL (context) || USING_GLES3 (context)
|
||||||
|
|
Loading…
Reference in a new issue