mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
gloverlay: Apply updated overlay coordinates correctly
When overlay coordinates are updated, after the initial coordinates are set, the shader indices are applied to the wrong buffer, resulting in the background image appearing where the overlay should. Bind the array buffer before applying subsequent coordinate updates. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5901>
This commit is contained in:
parent
745197d386
commit
fe64e68cc4
1 changed files with 2 additions and 2 deletions
|
@ -497,6 +497,8 @@ gst_gl_overlay_callback (GstGLFilter * filter, GstGLMemory * in_tex,
|
|||
gl->BindVertexArray (overlay->overlay_vao);
|
||||
}
|
||||
|
||||
_bind_buffer (overlay, overlay->overlay_vbo);
|
||||
|
||||
if (overlay->geometry_change) {
|
||||
gint render_width, render_height;
|
||||
gfloat x, y, image_width, image_height;
|
||||
|
@ -536,8 +538,6 @@ gst_gl_overlay_callback (GstGLFilter * filter, GstGLMemory * in_tex,
|
|||
GL_STATIC_DRAW);
|
||||
}
|
||||
|
||||
_bind_buffer (overlay, overlay->overlay_vbo);
|
||||
|
||||
gl->BindTexture (GL_TEXTURE_2D, image_tex);
|
||||
gst_gl_shader_set_uniform_1f (overlay->shader, "alpha", overlay->alpha);
|
||||
|
||||
|
|
Loading…
Reference in a new issue