This will make it easier to port these tests to gles2.
---
 tests/texturing/s3tc-teximage.c    | 9 ++-------
 tests/texturing/s3tc-texsubimage.c | 9 ++-------
 2 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/tests/texturing/s3tc-teximage.c b/tests/texturing/s3tc-teximage.c
index a08feaa69..a7225f6f0 100644
--- a/tests/texturing/s3tc-teximage.c
+++ b/tests/texturing/s3tc-teximage.c
@@ -61,13 +61,8 @@ display_mipmaps(int start_x, int start_y)
 
        /* Disply all the mipmap levels */
        for (i = SIZE; i > 0; i /= 2) {
-               glBegin(GL_QUADS);
-               glTexCoord2f(0.0, 0.0); glVertex2f(start_x + 0, start_y + 0);
-               glTexCoord2f(1.0, 0.0); glVertex2f(start_x + i, start_y + 0);
-               glTexCoord2f(1.0, 1.0); glVertex2f(start_x + i, start_y + i);
-               glTexCoord2f(0.0, 1.0); glVertex2f(start_x + 0, start_y + i);
-               glEnd();
-
+               piglit_draw_rect_tex(start_x, start_y, i, i,
+                                    0.0f, 0.0f, 1.0f, 1.0f);
                start_x += i + 5;
        }
 }
diff --git a/tests/texturing/s3tc-texsubimage.c 
b/tests/texturing/s3tc-texsubimage.c
index 39b94938e..3e2260139 100644
--- a/tests/texturing/s3tc-texsubimage.c
+++ b/tests/texturing/s3tc-texsubimage.c
@@ -61,13 +61,8 @@ display_mipmaps(int start_x, int start_y)
 
        /* Disply all the mipmap levels */
        for (i = SIZE; i > 0; i /= 2) {
-               glBegin(GL_QUADS);
-               glTexCoord2f(0.0, 0.0); glVertex2f(start_x + 0, start_y + 0);
-               glTexCoord2f(1.0, 0.0); glVertex2f(start_x + i, start_y + 0);
-               glTexCoord2f(1.0, 1.0); glVertex2f(start_x + i, start_y + i);
-               glTexCoord2f(0.0, 1.0); glVertex2f(start_x + 0, start_y + i);
-               glEnd();
-
+               piglit_draw_rect_tex(start_x, start_y, i, i,
+                                    0.0f, 0.0f, 1.0f, 1.0f);
                start_x += i + 5;
        }
 }
-- 
2.17.2

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to