mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-03 01:02:19 +00:00
gltransformation: draw with GL_TRIANGLES
Drawing 5 vertices with GL_TRIANGLE_STRIP will draw an extra unneeded triangle.
This commit is contained in:
parent
0214f4fb55
commit
1dc074d401
1 changed files with 6 additions and 6 deletions
|
@ -253,7 +253,7 @@ gst_gl_transformation_init (GstGLTransformation * filter)
|
||||||
filter->fov = 90;
|
filter->fov = 90;
|
||||||
filter->aspect = 1.0;
|
filter->aspect = 1.0;
|
||||||
filter->znear = 0.1f;
|
filter->znear = 0.1f;
|
||||||
filter->zfar = 100;
|
filter->zfar = 100.0;
|
||||||
|
|
||||||
filter->xscale = 1.0;
|
filter->xscale = 1.0;
|
||||||
filter->yscale = 1.0;
|
filter->yscale = 1.0;
|
||||||
|
@ -853,7 +853,7 @@ gst_gl_transformation_filter_texture (GstGLFilter * filter,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const GLushort indices[] = { 0, 1, 2, 3, 0 };
|
static const GLushort indices[] = { 0, 1, 2, 0, 2, 3 };
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_upload_vertices (GstGLTransformation * transformation)
|
_upload_vertices (GstGLTransformation * transformation)
|
||||||
|
@ -863,10 +863,10 @@ _upload_vertices (GstGLTransformation * transformation)
|
||||||
|
|
||||||
/* *INDENT-OFF* */
|
/* *INDENT-OFF* */
|
||||||
GLfloat vertices[] = {
|
GLfloat vertices[] = {
|
||||||
-transformation->aspect, 1.0, 0.0, 1.0, 0.0, 1.0,
|
-transformation->aspect, -1.0, 0.0, 1.0, 0.0, 0.0,
|
||||||
transformation->aspect, 1.0, 0.0, 1.0, 1.0, 1.0,
|
|
||||||
transformation->aspect, -1.0, 0.0, 1.0, 1.0, 0.0,
|
transformation->aspect, -1.0, 0.0, 1.0, 1.0, 0.0,
|
||||||
-transformation->aspect, -1.0, 0.0, 1.0, 0.0, 0.0
|
transformation->aspect, 1.0, 0.0, 1.0, 1.0, 1.0,
|
||||||
|
-transformation->aspect, 1.0, 0.0, 1.0, 0.0, 1.0,
|
||||||
};
|
};
|
||||||
/* *INDENT-ON* */
|
/* *INDENT-ON* */
|
||||||
|
|
||||||
|
@ -966,7 +966,7 @@ gst_gl_transformation_callback (gpointer stuff)
|
||||||
_upload_vertices (transformation);
|
_upload_vertices (transformation);
|
||||||
_bind_buffer (transformation);
|
_bind_buffer (transformation);
|
||||||
|
|
||||||
gl->DrawElements (GL_TRIANGLE_STRIP, 5, GL_UNSIGNED_SHORT, 0);
|
gl->DrawElements (GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0);
|
||||||
|
|
||||||
if (gl->GenVertexArrays)
|
if (gl->GenVertexArrays)
|
||||||
gl->BindVertexArray (0);
|
gl->BindVertexArray (0);
|
||||||
|
|
Loading…
Reference in a new issue