enum piglit_result piglit_display(void) { #define N_VECTOR_ITEMS 4 GLboolean pass = GL_TRUE; int count, i, j; float expected[N_VECTOR_ITEMS] = {0}; glClearColor(0.5, 0.5, 0.5, 0.5); glClear(GL_COLOR_BUFFER_BIT); for (count = 1; count <= max_targets; count++) { generate_and_display_drawbuffers(count); } for (count = 1; count <= max_targets; count++) { for (i = 0; i < count; i++) { for (j = 0; j < N_VECTOR_ITEMS; j++) { expected[j] = output_values[(i * N_VECTOR_ITEMS) + j] + clear_value; } pass = pass && piglit_probe_pixel_rgba(16 * i + 8, 16 * (count - 1) + 8, expected); } } glutSwapBuffers(); return pass ? PIGLIT_PASS : PIGLIT_FAIL; }
enum piglit_result piglit_display(void) { GLboolean pass = GL_TRUE; int count, i; glClearColor(0.5, 0.5, 0.5, 0.5); glClear(GL_COLOR_BUFFER_BIT); for (count = 1; count <= max_targets; count++) { generate_and_display_drawbuffers(count); } /* walk over rows */ for (count = 1; count <= max_targets; count++) { /* walk over columns */ for (i = 0; i < count; i++) { pass = pass && piglit_probe_pixel_rgb(16 * i + 8, 16 * (count - 1) + 8, colors[i]); } } piglit_present_results(); return pass ? PIGLIT_PASS : PIGLIT_FAIL; }
enum piglit_result piglit_display(void) { GLboolean pass = GL_TRUE; float green[] = {0, 1, 0, 0}; int count, i; glClearColor(0.5, 0.5, 0.5, 0.5); glClear(GL_COLOR_BUFFER_BIT); for (count = 1; count <= max_targets; count++) { generate_and_display_drawbuffers(count); } for (count = 1; count <= max_targets; count++) { for (i = 0; i < count; i++) { pass = pass && piglit_probe_pixel_rgb(16 * i + 8, 16 * (count - 1) + 8, green); } } glutSwapBuffers(); return pass ? PIGLIT_PASS : PIGLIT_FAIL; }