X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=progs%2Ftests%2Fexactrast.c;h=63b8336d97321c9132f397cf372fff2c7024c899;hb=a04af335a42ce3b28e59ff9b85b2bd433a9d7b12;hp=56c0c79c3fadb1d459bc8c4d51e463ab85474035;hpb=d7f1cb5b5a134b63227d5746a2dd1f05597c5c2f;p=mesa.git diff --git a/progs/tests/exactrast.c b/progs/tests/exactrast.c index 56c0c79c3fa..63b8336d973 100644 --- a/progs/tests/exactrast.c +++ b/progs/tests/exactrast.c @@ -26,6 +26,7 @@ #include #include +#include #include static int Width = 400, Height = 400; @@ -34,14 +35,14 @@ static float Xtrans = 0, Ytrans = 0; static float Step = 0.125; enum { - POINTS, - HLINES, - VLINES, - QUADS, + MODE_POINTS, + MODE_HLINES, + MODE_VLINES, + MODE_QUADS, NUM_MODES }; -static int Mode = POINTS; +static int Mode = MODE_POINTS; static void @@ -58,7 +59,7 @@ Draw(void) glPushMatrix(); glTranslatef(tx + Xtrans, ty + Ytrans, 0); - if (Mode == POINTS) { + if (Mode == MODE_POINTS) { glBegin(GL_POINTS); for (j = 0; j < Height; j += 2) { for (i = 0; i < Width; i += 2) { @@ -67,7 +68,7 @@ Draw(void) } glEnd(); } - else if (Mode == HLINES) { + else if (Mode == MODE_HLINES) { glBegin(GL_LINES); for (i = 0; i < Height; i += 2) { glVertex2f(0, i); @@ -75,7 +76,7 @@ Draw(void) } glEnd(); } - else if (Mode == VLINES) { + else if (Mode == MODE_VLINES) { glBegin(GL_LINES); for (i = 0; i < Width; i += 2) { glVertex2f(i, 0 ); @@ -83,7 +84,7 @@ Draw(void) } glEnd(); } - else if (Mode == QUADS) { + else if (Mode == MODE_QUADS) { glBegin(GL_QUADS); for (j = 0; j < Height; j += 4) { for (i = 0; i < Width; i += 4) { @@ -189,6 +190,7 @@ main(int argc, char *argv[]) glutInitWindowSize(Width, Height); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); Win = glutCreateWindow(argv[0]); + glewInit(); glutReshapeFunc(Reshape); glutKeyboardFunc(Key); glutSpecialFunc(SpecialKey);