[650/906] filter: fix _draw_texture()'s wrong vertices

This commit is contained in:
Matthew Waters 2013-01-16 22:41:18 +11:00 committed by Tim-Philipp Müller
parent 6bee9b9c93
commit 173467e48a

View file

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