summaryrefslogtreecommitdiff
path: root/progs/fp/fp-tri.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/fp/fp-tri.c')
-rw-r--r--progs/fp/fp-tri.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/progs/fp/fp-tri.c b/progs/fp/fp-tri.c
index 52a8fcfc22..70676d4c40 100644
--- a/progs/fp/fp-tri.c
+++ b/progs/fp/fp-tri.c
@@ -73,7 +73,7 @@ static void Init( void )
GLuint Texture;
GLint errno;
GLuint prognum;
- char buf[4096];
+ char buf[50000];
GLuint sz;
FILE *f;
@@ -176,6 +176,17 @@ static void Init( void )
}
+ {
+ const float Ambient[4] = { 0.0, 1.0, 0.0, 0.0 };
+ const float Diffuse[4] = { 1.0, 0.0, 0.0, 0.0 };
+ const float Specular[4] = { 0.0, 0.0, 1.0, 0.0 };
+ const float Emission[4] = { 0.0, 0.0, 0.0, 1.0 };
+ glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, Ambient);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, Diffuse);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, Specular);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, Emission);
+ }
+
glClearColor(.1, .3, .5, 0);
}
@@ -197,7 +208,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();