summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/eglgles/gsteglglessink.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/ext/eglgles/gsteglglessink.c b/ext/eglgles/gsteglglessink.c
index f51c6face..bb33ee42b 100644
--- a/ext/eglgles/gsteglglessink.c
+++ b/ext/eglgles/gsteglglessink.c
@@ -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;