summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2012-07-18 02:21:42 +0200
committerMarek Olšák <maraeo@gmail.com>2012-07-18 02:22:23 +0200
commit5a00f29d2ab4d6f7f927d9625563bb0a9d4e6202 (patch)
tree346691eb2352e9298554bb4fff101ba505fbfb9c
parent0a52142ae1e4deef663154872fbfc091561f1388 (diff)
linestipple: print what is tested
-rw-r--r--tests/general/linestipple.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/general/linestipple.c b/tests/general/linestipple.c
index 96c87e978..55b792ccc 100644
--- a/tests/general/linestipple.c
+++ b/tests/general/linestipple.c
@@ -47,6 +47,7 @@ struct vertex {
};
struct stipple_line {
+ const char *name;
GLint factor;
GLuint pattern;
GLfloat color[3];
@@ -131,31 +132,37 @@ static struct vertex Factor2Vertices[] = { { 0, 32 }, { 32, 32 }, { 32, 33 }, {
static struct vertex Factor3Vertices[] = { { 0, 35 }, { 63, 35 }, { 63, 36 }, { 0, 36 } };
static struct stipple_line Lines[] = {
{ /* Baseline */
+ "Baseline",
1, 0xffff, { 1.0, 1.0, 1.0 },
GL_LINES, 2,
BaselineVertices
},
{ /* Restarting lines within a single Begin/End block */
+ "Restarting lines within a single Begin/End block",
1, 0x00ff, { 1.0, 0.0, 0.0 },
GL_LINES, 4,
RestartVertices
},
{ /* Line strip */
+ "Line strip",
1, 0x0f8f, { 1.0, 1.0, 0.0 },
GL_LINE_STRIP, 3,
LinestripVertices
},
{ /* Line loop */
+ "Line loop",
1, 0x8cef, { 0.0, 1.0, 0.0 },
GL_LINE_LOOP, 4,
LineloopVertices
},
{ /* Factor 2x */
+ "Factor 2x",
2, 0x838f, { 0.0, 0.0, 1.0 },
GL_LINE_LOOP, 4,
Factor2Vertices
},
{ /* Factor 3x */
+ "Factor 3x",
3, 0xf731, { 0.0, 1.0, 1.0 },
GL_LINE_LOOP, 4,
Factor3Vertices
@@ -174,8 +181,10 @@ static void test(void)
glPushMatrix();
glTranslatef(basex, basey, 0.0);
- for(i = 0; i < sizeof(Lines)/sizeof(Lines[0]); ++i)
+ for(i = 0; i < sizeof(Lines)/sizeof(Lines[0]); ++i) {
+ puts(Lines[i].name);
test_line(&Lines[i]);
+ }
glPopMatrix();
glutSwapBuffers();