[Piglit] [PATCH 5/6] Add a "shade model" command to shader_runner.

Paul Berry stereotype441 at gmail.com
Thu Oct 20 14:12:27 PDT 2011


This command is a thin wrapper around glShadeModel().  So for
instance, the command "shade model flat" is equivalent to
"glShadeModel(GL_FLAT)".
---
 tests/shaders/shader_runner.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tests/shaders/shader_runner.c b/tests/shaders/shader_runner.c
index 8a585a6..216728a 100644
--- a/tests/shaders/shader_runner.c
+++ b/tests/shaders/shader_runner.c
@@ -1072,6 +1072,10 @@ piglit_display(void)
 			pass = pass &&
 				piglit_probe_rect_rgb(0, 0, piglit_width,
 						      piglit_height, c);
+		} else if (string_match("shade model smooth", line)) {
+			glShadeModel(GL_SMOOTH);
+		} else if (string_match("shade model flat", line)) {
+			glShadeModel(GL_FLAT);
 		} else if (sscanf(line,
 				  "texture rgbw %d ( %d , %d )",
 				  &tex, &w, &h) == 3) {
-- 
1.7.6.4



More information about the Piglit mailing list