diff options
author | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2018-10-24 15:57:35 +0200 |
---|---|---|
committer | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2018-11-21 12:42:39 +0100 |
commit | f653e12d1acffb82a64ec58e674f0d151998a210 (patch) | |
tree | 56723a9dce4b30f8957e86b152e00790269a0e6c /tests/texturing | |
parent | 7dae4f8d3c4b4b25fb8ac8a8b3cdaca42b4cccfc (diff) |
texturing: use piglit_draw_rect_tex instead of glBegin/glEnd
This will make it easier to port these tests to gles.
Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'tests/texturing')
-rw-r--r-- | tests/texturing/s3tc-teximage.c | 9 | ||||
-rw-r--r-- | 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; } } |