[Piglit] [PATCH 2/8] enable -fbo for general/varray-disabled
Chris Forbes
chrisf at ijw.co.nz
Sat Apr 28 17:44:55 PDT 2012
---
tests/general/varray-disabled.c | 23 ++++++++---------------
1 file changed, 8 insertions(+), 15 deletions(-)
diff --git a/tests/general/varray-disabled.c b/tests/general/varray-disabled.c
index cbd453d..39c3969 100644
--- a/tests/general/varray-disabled.c
+++ b/tests/general/varray-disabled.c
@@ -63,6 +63,13 @@ piglit_display(void)
GLfloat blue[3] = {0.0, 0.0, 1.0};
GLfloat black[3] = {0.0, 0.0, 0.0};
+ glViewport(0, 0, piglit_width, piglit_height);
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
@@ -123,26 +130,12 @@ piglit_display(void)
pass &= piglit_probe_pixel_rgb(piglit_width * 5 / 6,
piglit_height / 2, blue);
- glutSwapBuffers();
+ piglit_present_results();
return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
-
-static void Reshape(int width, int height)
-{
- piglit_width = width;
- piglit_height = height;
- glViewport(0, 0, width, height);
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(0.0, 1.0, 0.0, 1.0, -1.0, 1.0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
-}
-
void
piglit_init(int argc, char *argv[])
{
- glutReshapeFunc(Reshape);
}
--
1.7.10
More information about the Piglit
mailing list