Ejemplo n.º 1
0
enum piglit_result
piglit_display(void)
{
	GLboolean pass = GL_TRUE;

	glClearColor(1.0, 1.0, 1.0, 1.0);
	glClear(GL_COLOR_BUFFER_BIT);

	pass &= test_with_format(GL_RGBA8, GL_BGRA,
				 0, 0);
	pass &= test_with_format(GL_RGB5, GL_RGB,
				 0, BUF_HEIGHT + 1);
	pass &= test_with_format(GL_RGBA4, GL_BGRA,
				 0, (BUF_HEIGHT + 1) * 2);
	pass &= test_with_format(GL_RGB5_A1, GL_BGRA,
				 0, (BUF_HEIGHT + 1) * 3);
	piglit_present_results();

	return pass ? PIGLIT_PASS : PIGLIT_FAIL;
}
void piglit_init(int argc, char **argv)
{
	int i;
	bool pass = true;

	piglit_require_extension("GL_EXT_framebuffer_object");
	piglit_require_extension("GL_EXT_packed_depth_stencil");

	for (i = 0; i < ARRAY_SIZE(rb_internal_formats); i++) {
		pass = test_with_format(rb_internal_formats[i].token,
					rb_internal_formats[i].name) && pass;
	}

	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
}