This test also has hard-coded expected[] coords which assume a 64 x 32
window size.  New use the default window size but setup the projection
matrix and viewport as if the window was only 64 x 32.
---
 tests/spec/ext_transform_feedback/position.c |   16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/tests/spec/ext_transform_feedback/position.c 
b/tests/spec/ext_transform_feedback/position.c
index 25c01dc..e278f7f 100644
--- a/tests/spec/ext_transform_feedback/position.c
+++ b/tests/spec/ext_transform_feedback/position.c
@@ -33,9 +33,6 @@
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
        config.supports_gl_compat_version = 10;
-
-       config.window_width = 64;
-       config.window_height = 32;
        config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
 
 PIGLIT_GL_TEST_CONFIG_END
@@ -204,8 +201,19 @@ enum piglit_result piglit_display(void)
                break;
        }
 
-       /* Render into TFBO. */
+       /* Setup projection for a 64 x 32 window region.  That's what
+        * the expected coords above assume.
+        * XXX it would be better if the position coords in the above
+        * array were compute instead of fixed.
+        */
+       glMatrixMode(GL_PROJECTION);
+       glLoadIdentity();
+       glOrtho(0, 64, 0, 32, -1, 1);
+       glMatrixMode(GL_MODELVIEW);
        glLoadIdentity();
+        glViewport(0, 0, 64, 32);
+
+       /* Render into TFBO. */
        glUseProgram(prog);
        if (discard)
                glEnable(GL_RASTERIZER_DISCARD_EXT);
-- 
1.7.10.4

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to