From a6504181a31b1c87b9104cd719222e91c57040bc Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 16 Jan 2013 22:41:18 +1100 Subject: [PATCH] [650/906] filter: fix _draw_texture()'s wrong vertices --- gst-libs/gst/gl/gstglfilter.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c index 095b8ffc5b..109f1a0778 100644 --- a/gst-libs/gst/gl/gstglfilter.c +++ b/gst-libs/gst/gl/gstglfilter.c @@ -1140,15 +1140,15 @@ gst_gl_filter_draw_texture (GstGLFilter * filter, GLuint texture, { GstGLFuncs *gl = filter->display->gl_vtable; - gfloat verts[8] = { -1.0f, 1.0f, + gfloat verts[] = { -1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f }; - gint texcoords[8] = { 0, 0, + gint texcoords[] = { 0, 0, width, 0, - 0, height, - width, height + width, height, + 0, height }; GST_DEBUG ("drawing texture:%u dimensions:%ux%u", texture, width, height); @@ -1157,8 +1157,11 @@ gst_gl_filter_draw_texture (GstGLFilter * filter, GLuint texture, gl->Enable (GL_TEXTURE_RECTANGLE_ARB); gl->BindTexture (GL_TEXTURE_RECTANGLE_ARB, texture); + gl->ClientActiveTexture (GL_TEXTURE0); + gl->EnableClientState (GL_VERTEX_ARRAY); gl->EnableClientState (GL_TEXTURE_COORD_ARRAY); + gl->VertexPointer (2, GL_FLOAT, 0, &verts); gl->TexCoordPointer (2, GL_INT, 0, &texcoords);