mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
gl/caopengllayersink: port to new GstGLShader API
fixes build error: "undefined symbols for architecture: gst_gl_shader_compile_with_default_vf_and_check"
This commit is contained in:
parent
28d6a3edec
commit
2b3a224dc0
1 changed files with 12 additions and 3 deletions
|
@ -889,13 +889,22 @@ static void
|
|||
gst_ca_opengl_layer_sink_thread_init_redisplay (GstCAOpenGLLayerSink * ca_sink)
|
||||
{
|
||||
const GstGLFuncs *gl = ca_sink->context->gl_vtable;
|
||||
GError *error = NULL;
|
||||
|
||||
ca_sink->redisplay_shader = gst_gl_shader_new (ca_sink->context);
|
||||
|
||||
if (!gst_gl_shader_compile_with_default_vf_and_check
|
||||
(ca_sink->redisplay_shader, &ca_sink->attr_position,
|
||||
&ca_sink->attr_texture))
|
||||
if (!(ca_sink->redisplay_shader = gst_gl_shader_new_default (ca_sink->context, &error))) {
|
||||
GST_ERROR_OBJECT (ca_sink, "Failed to link shader: %s", error->message);
|
||||
gst_ca_opengl_layer_sink_cleanup_glthread (ca_sink);
|
||||
return;
|
||||
}
|
||||
|
||||
ca_sink->attr_position =
|
||||
gst_gl_shader_get_attribute_location (ca_sink->redisplay_shader,
|
||||
"a_position");
|
||||
ca_sink->attr_texture =
|
||||
gst_gl_shader_get_attribute_location (ca_sink->redisplay_shader,
|
||||
"a_texcoord");
|
||||
|
||||
if (gl->GenVertexArrays) {
|
||||
gl->GenVertexArrays (1, &ca_sink->vao);
|
||||
|
|
Loading…
Reference in a new issue