eglglessink: Provide the texture positions to the shader on every frame too

This commit is contained in:
Sebastian Dröge 2012-10-17 15:37:53 +02:00
parent 9941466ab4
commit f5043f5d64

View file

@ -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;