mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
glcolorconvert: GLES3 deprecates texture2D() and it does not work at all in newer versions than 3.3
Use the newer texture() function instead. This fixes glimagesink and other things on various Android devices. https://bugzilla.gnome.org/show_bug.cgi?id=765266
This commit is contained in:
parent
9cc00bf2c9
commit
57a4494528
1 changed files with 4 additions and 3 deletions
|
@ -1712,7 +1712,7 @@ _unbind_buffer (GstGLColorConvert * convert)
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
_mangle_texture_access (const gchar * str, GstGLTextureTarget from,
|
_mangle_texture_access (const gchar * str, GstGLTextureTarget from,
|
||||||
GstGLTextureTarget to, GstGLAPI gl_api)
|
GstGLTextureTarget to, GstGLAPI gl_api, guint gl_major, guint gl_minor)
|
||||||
{
|
{
|
||||||
const gchar *from_str = NULL, *to_str = NULL;
|
const gchar *from_str = NULL, *to_str = NULL;
|
||||||
gchar *ret, *tmp;
|
gchar *ret, *tmp;
|
||||||
|
@ -1726,7 +1726,8 @@ _mangle_texture_access (const gchar * str, GstGLTextureTarget from,
|
||||||
if (from == GST_GL_TEXTURE_TARGET_EXTERNAL_OES)
|
if (from == GST_GL_TEXTURE_TARGET_EXTERNAL_OES)
|
||||||
from_str = "texture2D";
|
from_str = "texture2D";
|
||||||
|
|
||||||
if (gl_api & GST_GL_API_OPENGL3) {
|
if ((gl_api & GST_GL_API_OPENGL3) || (gl_api & GST_GL_API_GLES2
|
||||||
|
&& gl_major >= 3)) {
|
||||||
to_str = "texture";
|
to_str = "texture";
|
||||||
} else {
|
} else {
|
||||||
if (to == GST_GL_TEXTURE_TARGET_2D)
|
if (to == GST_GL_TEXTURE_TARGET_2D)
|
||||||
|
@ -1894,7 +1895,7 @@ _mangle_shader (const gchar * str, guint shader_type, GstGLTextureTarget from,
|
||||||
|
|
||||||
_mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
|
_mangle_version_profile_from_gl_api (gl_api, gl_major, gl_minor, version,
|
||||||
profile);
|
profile);
|
||||||
tmp = _mangle_texture_access (str, from, to, gl_api);
|
tmp = _mangle_texture_access (str, from, to, gl_api, gl_major, gl_minor);
|
||||||
tmp2 = _mangle_sampler_type (tmp, from, to);
|
tmp2 = _mangle_sampler_type (tmp, from, to);
|
||||||
g_free (tmp);
|
g_free (tmp);
|
||||||
tmp =
|
tmp =
|
||||||
|
|
Loading…
Reference in a new issue