=== modified file 'shader.cpp'
@@ -79,17 +79,35 @@
"NormalMatrix");
mLocations.LightSourcePosition = glGetUniformLocation(mShaderProgram,
"LightSourcePosition");
+ mLocations.LightSourceHalfVector = glGetUniformLocation(mShaderProgram,
+ "LightSourceHalfVector");
+
+ mLocations.LightSourceAmbient = glGetUniformLocation(mShaderProgram,
+ "LightSourceAmbient");
mLocations.LightSourceDiffuse = glGetUniformLocation(mShaderProgram,
"LightSourceDiffuse");
+ mLocations.LightSourceSpecular = glGetUniformLocation(mShaderProgram,
+ "LightSourceSpecular");
+
+ mLocations.MaterialAmbient = glGetUniformLocation(mShaderProgram,
+ "MaterialAmbient");
mLocations.MaterialDiffuse = glGetUniformLocation(mShaderProgram,
"MaterialDiffuse");
+ mLocations.MaterialSpecular = glGetUniformLocation(mShaderProgram,
+ "MaterialSpecular");
+
#ifdef _DEBUG
- printf("Uniform Locations: %d %d %d %d %d\n",
+ printf("Uniform Locations: %d %d %d %d %d %d %d %d\n",
mLocations.ModelViewProjectionMatrix,
mLocations.NormalMatrix,
mLocations.LightSourcePosition,
+ mLocations.LightSourceHalfVector,
+ mLocations.LightSourceAmbient,
mLocations.LightSourceDiffuse,
- mLocations.MaterialDiffuse);
+ mLocations.LightSourceSpecular,
+ mLocations.MaterialAmbient,
+ mLocations.MaterialDiffuse,
+ mLocations.MaterialSpecular);
#endif
}
=== modified file 'shader.h'
@@ -21,8 +21,13 @@
GLint ModelViewProjectionMatrix;
GLint NormalMatrix;
GLint LightSourcePosition;
+ GLint LightSourceHalfVector;
+ GLint LightSourceAmbient;
GLint LightSourceDiffuse;
+ GLint LightSourceSpecular;
+ GLint MaterialAmbient;
GLint MaterialDiffuse;
+ GLint MaterialSpecular;
} mLocations;
enum {