[Piglit] [PATCH 04/18] shader_runner: Draw instanced rectangles using triangle strips instead of quads.

Paul Berry stereotype441 at gmail.com
Thu Jun 13 11:47:26 PDT 2013


On 3 June 2013 05:42, Fabian Bieler <fabianbieler at fastmail.fm> wrote:

> This is usefull for core profile OpenGL contexts and geometry shaders.
>

s/usefull/useful/ here too.

Reviewed-by: Paul Berry <stereotype441 at gmail.com>


> ---
>  tests/shaders/shader_runner.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
> index e022b90..874e76b 100644
> --- a/tests/shaders/shader_runner.c
> +++ b/tests/shaders/shader_runner.c
> @@ -1454,11 +1454,11 @@ draw_instanced_rect(int primcount, float x, float
> y, float w, float h)
>         verts[1][1] = y;
>         verts[1][2] = 0.0;
>         verts[1][3] = 1.0;
> -       verts[2][0] = x + w;
> +       verts[2][0] = x;
>         verts[2][1] = y + h;
>         verts[2][2] = 0.0;
>         verts[2][3] = 1.0;
> -       verts[3][0] = x;
> +       verts[3][0] = x + w;
>         verts[3][1] = y + h;
>         verts[3][2] = 0.0;
>         verts[3][3] = 1.0;
> @@ -1466,7 +1466,7 @@ draw_instanced_rect(int primcount, float x, float y,
> float w, float h)
>         glVertexPointer(4, GL_FLOAT, 0, verts);
>         glEnableClientState(GL_VERTEX_ARRAY);
>
> -       glDrawArraysInstanced(GL_QUADS, 0, 4, primcount);
> +       glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, primcount);
>
>         glDisableClientState(GL_VERTEX_ARRAY);
>  }
> --
> 1.8.1.2
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130613/a09229c6/attachment-0001.html>


More information about the Piglit mailing list