mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
glcolorscale: fix operation with dual GL, GLES2 libgstgl
This commit is contained in:
parent
598a79a5e2
commit
5681f78362
1 changed files with 16 additions and 12 deletions
|
@ -160,6 +160,7 @@ gst_gl_colorscale_gen_gl_resources (GstGLFilter * filter)
|
|||
{
|
||||
GstGLColorscale *colorscale = GST_GL_COLORSCALE (filter);
|
||||
|
||||
if (gst_gl_context_get_gl_api (filter->context) & GST_GL_API_GLES2) {
|
||||
gst_gl_context_thread_add (filter->context,
|
||||
(GstGLContextThreadFunc) _compile_identity_shader, colorscale);
|
||||
|
||||
|
@ -170,6 +171,7 @@ gst_gl_colorscale_gen_gl_resources (GstGLFilter * filter)
|
|||
gst_gl_context_get_error ()), (NULL));
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -195,11 +197,13 @@ gst_gl_colorscale_filter_texture (GstGLFilter * filter, guint in_tex,
|
|||
colorscale = GST_GL_COLORSCALE (filter);
|
||||
|
||||
#if GST_GL_HAVE_GLES2
|
||||
if (gst_gl_context_get_gl_api (filter->context) & GST_GL_API_GLES2)
|
||||
gst_gl_filter_render_to_target_with_shader (filter, TRUE, in_tex, out_tex,
|
||||
colorscale->shader);
|
||||
#endif
|
||||
|
||||
#if GST_GL_HAVE_OPENGL
|
||||
if (gst_gl_context_get_gl_api (filter->context) & GST_GL_API_OPENGL)
|
||||
gst_gl_filter_render_to_target (filter, TRUE, in_tex, out_tex,
|
||||
gst_gl_colorscale_callback, colorscale);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue