summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTonu Jaansoo <chain@bsd.ee>2013-08-07 11:42:46 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-08-07 11:42:46 +0200
commit8071c46372b8d4da4bc040ff3487e26a5fdfe608 (patch)
treefab695fd579628b2a1a5d1e86b0c8ddfb08f62b5
parentd8f38905091b6f9d70ff01dbc5c898f93407c961 (diff)
gl: The GLSL rectangle resampler does not always work with int tex coords
Use floats instead.
-rw-r--r--gst-libs/gst/gl/gstglfilter.c6
-rw-r--r--gst-libs/gst/gl/gstglupload.c6
-rw-r--r--gst/gl/gstgldeinterlace.c8
-rw-r--r--gst/gl/gstgleffects.c6
-rw-r--r--gst/gl/gstglimagesink.c6
5 files changed, 16 insertions, 16 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);
diff --git a/gst/gl/gstgldeinterlace.c b/gst/gl/gstgldeinterlace.c
index 26820f8..6edd177 100644
--- a/gst/gl/gstgldeinterlace.c
+++ b/gst/gl/gstgldeinterlace.c
@@ -267,17 +267,17 @@ gst_gl_deinterlace_callback (gint width, gint height, guint texture,
GstGLFuncs *gl = filter->display->gl_vtable;
guint temp;
- gfloat verts[] = { -1.0, -1.0,
+ GLfloat verts[] = { -1.0, -1.0,
1.0, -1.0,
1.0, 1.0,
-1.0, 1.0
};
- gint texcoords0[] = { 0, 0,
+ GLfloat texcoords0[] = { 0, 0,
width, 0,
width, height,
0, height
};
- gint texcoords1[] = { 0, 0,
+ GLfloat texcoords1[] = { 0, 0,
width, 0,
width, height,
0, height
@@ -324,7 +324,7 @@ gst_gl_deinterlace_callback (gint width, gint height, guint texture,
gl->EnableClientState (GL_VERTEX_ARRAY);
gl->VertexPointer (2, GL_FLOAT, 0, &verts);
- gl->TexCoordPointer (2, GL_INT, 0, &texcoords0);
+ gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords0);
gl->ClientActiveTexture (GL_TEXTURE1);
gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
diff --git a/gst/gl/gstgleffects.c b/gst/gl/gstgleffects.c
index 4f6582c..6649b71 100644
--- a/gst/gl/gstgleffects.c
+++ b/gst/gl/gstgleffects.c
@@ -280,12 +280,12 @@ gst_gl_effects_draw_texture (GstGLEffects * effects, GLuint tex, guint width,
#if GST_GL_HAVE_OPENGL
if (gst_gl_display_get_gl_api (display) & GST_GL_API_OPENGL) {
- 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
@@ -300,7 +300,7 @@ gst_gl_effects_draw_texture (GstGLEffects * effects, GLuint tex, guint width,
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/gl/gstglimagesink.c b/gst/gl/gstglimagesink.c
index 40e0ec0..3cae93e 100644
--- a/gst/gl/gstglimagesink.c
+++ b/gst/gl/gstglimagesink.c
@@ -977,12 +977,12 @@ gst_glimage_sink_on_draw (GstGLImageSink * gl_sink)
else {
#if GST_GL_HAVE_OPENGL
if (USING_OPENGL (gl_sink->display)) {
- 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] = { gl_sink->redisplay_texture_width, 0,
+ GLfloat texcoords[8] = { gl_sink->redisplay_texture_width, 0,
0, 0,
0, gl_sink->redisplay_texture_height,
gl_sink->redisplay_texture_width,
@@ -999,7 +999,7 @@ gst_glimage_sink_on_draw (GstGLImageSink * gl_sink)
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);
+ gl->TexCoordPointer (2, GL_FLOAT, 0, &texcoords);
gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4);