[Piglit] [PATCH 3/4] fbo-drawbuffers: Use clip coordinates instead of window coordinates
Ian Romanick
idr at freedesktop.org
Mon Oct 3 11:40:23 PDT 2011
From: Ian Romanick <ian.d.romanick at intel.com>
This makes the change to use shaders a bit easier.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
tests/fbo/fbo-drawbuffers.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/tests/fbo/fbo-drawbuffers.c b/tests/fbo/fbo-drawbuffers.c
index a67c2f8..36e057c 100644
--- a/tests/fbo/fbo-drawbuffers.c
+++ b/tests/fbo/fbo-drawbuffers.c
@@ -93,7 +93,7 @@ piglit_display(void)
glClear(GL_COLOR_BUFFER_BIT);
glColor4fv(green);
- piglit_draw_rect(0, 0, piglit_width, piglit_height);
+ piglit_draw_rect(-1, -1, 2, 2);
piglit_BindFramebuffer(GL_FRAMEBUFFER, 0);
@@ -101,13 +101,9 @@ piglit_display(void)
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
glBindTexture(GL_TEXTURE_2D, tex0);
- piglit_draw_rect_tex(0, 0,
- piglit_width / 2, piglit_height,
- 0, 0, 1, 1);
+ piglit_draw_rect_tex(-1, -1, 1, 2, 0, 0, 1, 1);
glBindTexture(GL_TEXTURE_2D, tex1);
- piglit_draw_rect_tex(piglit_width / 2, 0,
- piglit_width, piglit_height,
- 0, 0, 1, 1);
+ piglit_draw_rect_tex(0, -1, 1, 2, 0, 0, 1, 1);
glDisable(GL_TEXTURE_2D);
glDeleteTextures(1, &tex0);
glDeleteTextures(1, &tex1);
@@ -126,8 +122,6 @@ piglit_init(int argc, char **argv)
{
GLint num;
- piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
-
piglit_require_fbo();
piglit_require_extension("GL_ARB_draw_buffers");
--
1.7.6
More information about the Piglit
mailing list