mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
eglglessink: Provide the texture positions to the shader on every frame too
This commit is contained in:
parent
9941466ab4
commit
f5043f5d64
1 changed files with 5 additions and 8 deletions
|
@ -1589,14 +1589,6 @@ gst_eglglessink_setup_vbo (GstEglGlesSink * eglglessink, gboolean reset)
|
|||
if (got_gl_error ("glBufferData position_buffer"))
|
||||
goto HANDLE_ERROR_LOCKED;
|
||||
|
||||
/* Map the texpos already */
|
||||
glUseProgram (eglglessink->eglglesctx.glslprogram[0]);
|
||||
glVertexAttribPointer (eglglessink->eglglesctx.texpos_loc, 2, GL_FLOAT,
|
||||
GL_FALSE, 5 * sizeof (gfloat), (gpointer) (3 * sizeof (gfloat)));
|
||||
if (got_gl_error ("glVertexAttribPointer"))
|
||||
goto HANDLE_ERROR_LOCKED;
|
||||
glUseProgram (0);
|
||||
|
||||
glBindBuffer (GL_ELEMENT_ARRAY_BUFFER, eglglessink->eglglesctx.index_buffer);
|
||||
if (got_gl_error ("glBindBuffer index_buffer"))
|
||||
goto HANDLE_ERROR_LOCKED;
|
||||
|
@ -2538,6 +2530,11 @@ gst_eglglessink_render_and_display (GstEglGlesSink * eglglessink,
|
|||
if (got_gl_error ("glVertexAttribPointer"))
|
||||
goto HANDLE_ERROR;
|
||||
|
||||
glVertexAttribPointer (eglglessink->eglglesctx.texpos_loc, 2, GL_FLOAT,
|
||||
GL_FALSE, sizeof (coord5), (gpointer) (3 * sizeof (gfloat)));
|
||||
if (got_gl_error ("glVertexAttribPointer"))
|
||||
goto HANDLE_ERROR;
|
||||
|
||||
glDrawElements (GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_SHORT, 0);
|
||||
if (got_gl_error ("glDrawElements"))
|
||||
goto HANDLE_ERROR;
|
||||
|
|
Loading…
Reference in a new issue