diff options
Diffstat (limited to 'progs/vp/vp-tris.c')
-rw-r--r-- | progs/vp/vp-tris.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/progs/vp/vp-tris.c b/progs/vp/vp-tris.c index 3fe35f7e3e..e1ddb2e14d 100644 --- a/progs/vp/vp-tris.c +++ b/progs/vp/vp-tris.c @@ -5,7 +5,6 @@ #include <stdio.h> #include <stdlib.h> #include <math.h> -#include <GL/glut.h> #ifndef WIN32 #include <unistd.h> @@ -15,6 +14,8 @@ #include <GL/glext.h> #endif +#include <GL/glut.h> + #ifdef WIN32 static PFNGLBINDPROGRAMARBPROC glBindProgramARB = NULL; static PFNGLGENPROGRAMSARBPROC glGenProgramsARB = NULL; @@ -155,6 +156,17 @@ static void Init( void ) printf("errorpos: %d\n", errorpos); printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)); } + + { + 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); + } } |