summaryrefslogtreecommitdiff
path: root/tests/texturing/depth-cube-map.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-12-20 15:23:01 -0800
committerEric Anholt <eric@anholt.net>2013-01-09 11:57:31 -0800
commitdedc52871a6d144142c7fcd8c08a88f4a64cd74b (patch)
tree13c8e0ef06e8bfb1fac22c55399ed1a13c075a26 /tests/texturing/depth-cube-map.c
parent73337597280a52721cb6cb5330e401287f87b8f9 (diff)
depth-cube-map: Fix for airlied's reordering of cube_face_texcoords.
While I'm here, also change which faces are expected where on the screen. Before it was expecting: -Y +Z -Z +X -X +Y But I think this makes more sense: -X -Y -Z +X +Y +Z
Diffstat (limited to 'tests/texturing/depth-cube-map.c')
-rw-r--r--tests/texturing/depth-cube-map.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/texturing/depth-cube-map.c b/tests/texturing/depth-cube-map.c
index 0589c4b05..5c9e206f4 100644
--- a/tests/texturing/depth-cube-map.c
+++ b/tests/texturing/depth-cube-map.c
@@ -199,40 +199,40 @@ piglit_display(void)
/* Apply each face of cubemap as a texture to a polygon */
glUniform1i(loc1, 0);
- glTexCoordPointer(3, GL_FLOAT, 0, cube_face_texcoords[0]);
+ glTexCoordPointer(3, GL_FLOAT, 0, cube_face_texcoords[0]); /* +X */
glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_INT, elements);
glPushMatrix();
glTranslatef(75.0, 0.0, 0.0);
- glTexCoordPointer(3, GL_FLOAT, 0, cube_face_texcoords[3]);
+ glTexCoordPointer(3, GL_FLOAT, 0, cube_face_texcoords[2]); /* +Y */
glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_INT, elements);
glTranslatef(75.0, 0.0, 0.0);
- glTexCoordPointer(3, GL_FLOAT, 0, cube_face_texcoords[1]);
+ glTexCoordPointer(3, GL_FLOAT, 0, cube_face_texcoords[4]); /* +Z */
glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_INT, elements);
glPopMatrix();
glPushMatrix();
glTranslatef(0.0, 75.0, 0.0);
- glTexCoordPointer(3, GL_FLOAT, 0, cube_face_texcoords[4]);
+ glTexCoordPointer(3, GL_FLOAT, 0, cube_face_texcoords[1]); /* -X */
glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_INT, elements);
glTranslatef(75.0, 0.0, 0.0);
- glTexCoordPointer(3, GL_FLOAT, 0, cube_face_texcoords[2]);
+ glTexCoordPointer(3, GL_FLOAT, 0, cube_face_texcoords[3]); /* -Y */
glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_INT, elements);
glTranslatef(75.0, 0.0, 0.0);
- glTexCoordPointer(3, GL_FLOAT, 0, cube_face_texcoords[5]);
+ glTexCoordPointer(3, GL_FLOAT, 0, cube_face_texcoords[5]); /* -Z */
glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_INT, elements);
glPopMatrix();
/* Test the pixel color of polygons against the expected output */
pass = piglit_probe_pixel_rgb(110, 135, ColorPosX);
- pass = pass && piglit_probe_pixel_rgb(185, 135, ColorNegX);
- pass = pass && piglit_probe_pixel_rgb(260, 135, ColorPosY);
- pass = pass && piglit_probe_pixel_rgb(110, 210, ColorNegY);
- pass = pass && piglit_probe_pixel_rgb(185, 210, ColorPosZ);
- pass = pass && piglit_probe_pixel_rgb(260, 210, ColorNegZ);
+ pass = piglit_probe_pixel_rgb(185, 135, ColorPosY) && pass;
+ pass = piglit_probe_pixel_rgb(260, 135, ColorPosZ) && pass;
+ pass = piglit_probe_pixel_rgb(110, 210, ColorNegX) && pass;
+ pass = piglit_probe_pixel_rgb(185, 210, ColorNegY) && pass;
+ pass = piglit_probe_pixel_rgb(260, 210, ColorNegZ) && pass;
pass = piglit_check_gl_error(GL_NO_ERROR) && pass;
piglit_present_results();