Commit 07978f15 authored by Eric Anholt's avatar Eric Anholt

shaders: Remove a bunch of copies of piglit_escape_exit_key().

parent 145d85b9
......@@ -321,20 +321,6 @@ static void Reshape(int width, int height)
glLoadIdentity();
}
static void Key(unsigned char key, int x, int y)
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
static void Init(void)
{
int i, x, y;
......@@ -411,7 +397,7 @@ int main(int argc, char *argv[])
glutInitDisplayMode(GLUT_RGBA | GLUT_ALPHA | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutKeyboardFunc(piglit_escape_exit_key);
glutDisplayFunc(Redisplay);
glewInit();
Init();
......
......@@ -288,20 +288,6 @@ static void Reshape(int width, int height)
glLoadIdentity();
}
static void Key(unsigned char key, int x, int y)
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
static void Init(void)
{
int i, x, y;
......@@ -351,7 +337,7 @@ int main(int argc, char *argv[])
glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow(argv[0]);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutKeyboardFunc(piglit_escape_exit_key);
glutDisplayFunc(Redisplay);
glewInit();
Init();
......
......@@ -78,19 +78,6 @@ display(void)
}
}
static void key(unsigned char key, int x, int y)
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
static void init()
{
GLint vs, fs;
......@@ -136,7 +123,7 @@ int main(int argc, char**argv)
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(WIN_WIDTH, WIN_HEIGHT);
glutCreateWindow("glsl-fs-exp2");
glutKeyboardFunc(key);
glutKeyboardFunc(piglit_escape_exit_key);
glutDisplayFunc(display);
glewInit();
......
......@@ -78,19 +78,6 @@ display(void)
}
}
static void key(unsigned char key, int x, int y)
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
static void init()
{
GLint vs, fs;
......@@ -136,7 +123,7 @@ int main(int argc, char**argv)
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(WIN_WIDTH, WIN_HEIGHT);
glutCreateWindow("glsl-fs-log2");
glutKeyboardFunc(key);
glutKeyboardFunc(piglit_escape_exit_key);
glutDisplayFunc(display);
glewInit();
......
......@@ -84,19 +84,6 @@ display(void)
}
}
static void key(unsigned char key, int x, int y)
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
static void init()
{
GLint vs, fs;
......@@ -141,7 +128,7 @@ int main(int argc, char**argv)
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(WIN_WIDTH, WIN_HEIGHT);
glutCreateWindow("glsl-uniform-update");
glutKeyboardFunc(key);
glutKeyboardFunc(piglit_escape_exit_key);
glutDisplayFunc(display);
glewInit();
......
......@@ -88,19 +88,6 @@ display(void)
}
}
static void key(unsigned char key, int x, int y)
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
static void init()
{
GLint vs, fs;
......@@ -147,7 +134,7 @@ int main(int argc, char**argv)
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(WIN_WIDTH, WIN_HEIGHT);
glutCreateWindow("glsl-unused-varying");
glutKeyboardFunc(key);
glutKeyboardFunc(piglit_escape_exit_key);
glutDisplayFunc(display);
glewInit();
......
......@@ -109,19 +109,6 @@ display(void)
}
}
static void key(unsigned char key, int x, int y)
{
(void) x;
(void) y;
switch (key) {
case 27:
exit(0);
break;
}
glutPostRedisplay();
}
static void init()
{
GLint vs, fs;
......@@ -165,8 +152,8 @@ int main(int argc, char**argv)
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
glutInitWindowSize(WIN_WIDTH, WIN_HEIGHT);
glutCreateWindow("glsl-uniform-update");
glutKeyboardFunc(key);
glutCreateWindow("glsl-vs-loop");
glutKeyboardFunc(piglit_escape_exit_key);
glutDisplayFunc(display);
glewInit();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment