summaryrefslogtreecommitdiff
path: root/progs/glsl/bump.c
diff options
context:
space:
mode:
Diffstat (limited to 'progs/glsl/bump.c')
-rw-r--r--progs/glsl/bump.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/progs/glsl/bump.c b/progs/glsl/bump.c
index ddb986abcb..87669aec73 100644
--- a/progs/glsl/bump.c
+++ b/progs/glsl/bump.c
@@ -24,11 +24,11 @@ static GLuint program;
static struct uniform_info Uniforms[] = {
- { "LightPosition", 3, GL_FLOAT, { 0.57737, 0.57735, 0.57735, 0.0 }, -1 },
- { "SurfaceColor", 3, GL_FLOAT, { 0.8, 0.8, 0.2, 0 }, -1 },
- { "BumpDensity", 1, GL_FLOAT, { 10.0, 0, 0, 0 }, -1 },
- { "BumpSize", 1, GL_FLOAT, { 0.125, 0, 0, 0 }, -1 },
- { "SpecularFactor", 1, GL_FLOAT, { 0.5, 0, 0, 0 }, -1 },
+ { "LightPosition", 1, GL_FLOAT_VEC3, { 0.57737, 0.57735, 0.57735, 0.0 }, -1 },
+ { "SurfaceColor", 1, GL_FLOAT_VEC3, { 0.8, 0.8, 0.2, 0 }, -1 },
+ { "BumpDensity", 1, GL_FLOAT, { 10.0, 0, 0, 0 }, -1 },
+ { "BumpSize", 1, GL_FLOAT, { 0.125, 0, 0, 0 }, -1 },
+ { "SpecularFactor", 1, GL_FLOAT, { 0.5, 0, 0, 0 }, -1 },
END_OF_UNIFORMS
};
@@ -242,7 +242,8 @@ Init(void)
CheckError(__LINE__);
- InitUniforms(program, Uniforms);
+ SetUniformValues(program, Uniforms);
+ PrintUniforms(Uniforms);
CheckError(__LINE__);
@@ -280,7 +281,6 @@ int
main(int argc, char *argv[])
{
glutInit(&argc, argv);
- glutInitWindowPosition( 0, 0);
glutInitWindowSize(400, 400);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
win = glutCreateWindow(argv[0]);