mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
[787/906] gl: The GLSL rectangle resampler does not always work with int tex coords
Use floats instead.
This commit is contained in:
parent
396717587e
commit
c304635ecf
2 changed files with 6 additions and 6 deletions
|
@ -1168,12 +1168,12 @@ gst_gl_filter_draw_texture (GstGLFilter * filter, GLuint texture,
|
||||||
{
|
{
|
||||||
GstGLFuncs *gl = filter->display->gl_vtable;
|
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,
|
1.0f, 1.0f,
|
||||||
-1.0f, 1.0f
|
-1.0f, 1.0f
|
||||||
};
|
};
|
||||||
gint texcoords[] = { 0, 0,
|
GLfloat texcoords[] = { 0, 0,
|
||||||
width, 0,
|
width, 0,
|
||||||
width, height,
|
width, height,
|
||||||
0, height
|
0, height
|
||||||
|
@ -1191,7 +1191,7 @@ gst_gl_filter_draw_texture (GstGLFilter * filter, GLuint texture,
|
||||||
gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
|
gl->EnableClientState (GL_TEXTURE_COORD_ARRAY);
|
||||||
|
|
||||||
gl->VertexPointer (2, GL_FLOAT, 0, &verts);
|
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);
|
gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4);
|
||||||
|
|
||||||
|
|
|
@ -1207,12 +1207,12 @@ _do_upload_draw_opengl (GstGLDisplay * display, GstGLUpload * upload)
|
||||||
gint i;
|
gint i;
|
||||||
gfloat tex_scaling[6] = { 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 };
|
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,
|
-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, 0,
|
||||||
0, in_height,
|
0, in_height,
|
||||||
in_width, 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->EnableClientState (GL_TEXTURE_COORD_ARRAY);
|
||||||
|
|
||||||
gl->VertexPointer (2, GL_FLOAT, 0, &verts);
|
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);
|
gl->DrawArrays (GL_TRIANGLE_FAN, 0, 4);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue