From c304635ecf5d609f57a4084b093eeaeed396751e Mon Sep 17 00:00:00 2001 From: Tonu Jaansoo Date: Wed, 7 Aug 2013 11:42:46 +0200 Subject: [PATCH] [787/906] gl: The GLSL rectangle resampler does not always work with int tex coords Use floats instead. --- gst-libs/gst/gl/gstglfilter.c | 6 +++--- gst-libs/gst/gl/gstglupload.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c index 65a4796..b6743dc 100644 --- a/gst-libs/gst/gl/gstglfilter.c +++ b/gst-libs/gst/gl/gstglfilter.c @@ -1168,12 +1168,12 @@ gst_gl_filter_draw_texture (GstGLFilter * filter, GLuint texture, { GstGLFuncs *gl = filter->display->gl_vtable; - gfloat verts[] = { -1.0f, -1.0f, + GLfloat verts[] = { -1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f }; - gint texcoords[] = { 0, 0, + GLfloat texcoords[] = { 0, 0, width, 0, width, height, 0, height @@ -1191,7 +1191,7 @@ gst_gl_filter_draw_texture (GstGLFilter * filter, GLuint texture, gl->EnableClientState (GL_TEXTURE_COORD_ARRAY); gl->VertexPointer (2, GL_FLOAT, 0, &verts); - gl->TexCoordPointer (2, GL_INT, 0, &texcoords); + gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords); gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4); diff --git a/gst-libs/gst/gl/gstglupload.c b/gst-libs/gst/gl/gstglupload.c index 5c220c5..bf41f23 100644 --- a/gst-libs/gst/gl/gstglupload.c +++ b/gst-libs/gst/gl/gstglupload.c @@ -1207,12 +1207,12 @@ _do_upload_draw_opengl (GstGLDisplay * display, GstGLUpload * upload) gint i; gfloat tex_scaling[6] = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 }; - gfloat verts[8] = { 1.0f, -1.0f, + GLfloat verts[8] = { 1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, 1.0f, 1.0f }; - gint texcoords[8] = { in_width, 0, + GLfloat texcoords[8] = { in_width, 0, 0, 0, 0, in_height, in_width, in_height @@ -1337,7 +1337,7 @@ _do_upload_draw_opengl (GstGLDisplay * display, GstGLUpload * upload) gl->EnableClientState (GL_TEXTURE_COORD_ARRAY); gl->VertexPointer (2, GL_FLOAT, 0, &verts); - gl->TexCoordPointer (2, GL_INT, 0, &texcoords); + gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords); gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4); -- 2.7.4