eglglessink: Reorder vertex value order to make a bit more sense

This commit is contained in:
Sebastian Dröge 2012-09-21 12:14:20 +02:00
parent 8018681187
commit cb034b2ecd

View file

@ -1135,25 +1135,25 @@ gst_eglglessink_setup_vbo (GstEglGlesSink * eglglessink, gboolean reset)
if (!eglglessink->have_vbo || reset) {
GST_DEBUG_OBJECT (eglglessink, "Performing VBO setup");
eglglessink->coordarray[0].x = -1;
eglglessink->coordarray[0].x = 1;
eglglessink->coordarray[0].y = 1;
eglglessink->coordarray[0].z = 0;
eglglessink->coordarray[1].x = 1;
eglglessink->coordarray[1].y = 1;
eglglessink->coordarray[1].y = -1;
eglglessink->coordarray[1].z = 0;
eglglessink->coordarray[2].x = 1;
eglglessink->coordarray[2].y = -1;
eglglessink->coordarray[2].x = -1;
eglglessink->coordarray[2].y = 1;
eglglessink->coordarray[2].z = 0;
eglglessink->coordarray[3].x = -1;
eglglessink->coordarray[3].y = -1;
eglglessink->coordarray[3].z = 0;
eglglessink->indexarray[0] = 1;
eglglessink->indexarray[1] = 2;
eglglessink->indexarray[2] = 0;
eglglessink->indexarray[0] = 0;
eglglessink->indexarray[1] = 1;
eglglessink->indexarray[2] = 2;
eglglessink->indexarray[3] = 3;
glGenBuffers (1, &eglglessink->vdata);
@ -1600,8 +1600,7 @@ gst_eglglessink_render_and_display (GstEglGlesSink * eglglessink,
* a sane default. According to the docs on the xOverlay
* interface we are supposed to fill the overlay 100%
*/
if (!eglglessink->display_region.w || !eglglessink->display_region.h)
{
if (!eglglessink->display_region.w || !eglglessink->display_region.h) {
/* XXX: Do we really want to lock here? */
if (!eglglessink->keep_aspect_ratio) {
eglglessink->display_region.x = 0;
@ -1618,8 +1617,9 @@ gst_eglglessink_render_and_display (GstEglGlesSink * eglglessink,
&eglglessink->display_region, TRUE);
}
glViewport (eglglessink->display_region.x, eglglessink->display_region.y,
eglglessink->display_region.w, eglglessink->display_region.h);
glViewport (eglglessink->display_region.x,
eglglessink->display_region.y, eglglessink->display_region.w,
eglglessink->display_region.h);
}
glDrawElements (GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_SHORT, 0);