diff options
Diffstat (limited to 'progs/glsl/brick.c')
-rw-r--r-- | progs/glsl/brick.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/progs/glsl/brick.c b/progs/glsl/brick.c index 1d08b231e7..20417aa462 100644 --- a/progs/glsl/brick.c +++ b/progs/glsl/brick.c @@ -24,12 +24,12 @@ static GLuint program; static struct uniform_info Uniforms[] = { /* vert */ - { "LightPosition", 3, GL_FLOAT, { 0.1, 0.1, 9.0, 0}, -1 }, + { "LightPosition", 1, GL_FLOAT_VEC3, { 0.1, 0.1, 9.0, 0}, -1 }, /* frag */ - { "BrickColor", 3, GL_FLOAT, { 0.8, 0.2, 0.2, 0 }, -1 }, - { "MortarColor", 3, GL_FLOAT, { 0.6, 0.6, 0.6, 0 }, -1 }, - { "BrickSize", 2, GL_FLOAT, { 1.0, 0.3, 0, 0 }, -1 }, - { "BrickPct", 2, GL_FLOAT, { 0.9, 0.8, 0, 0 }, -1 }, + { "BrickColor", 1, GL_FLOAT_VEC3, { 0.8, 0.2, 0.2, 0 }, -1 }, + { "MortarColor", 1, GL_FLOAT_VEC3, { 0.6, 0.6, 0.6, 0 }, -1 }, + { "BrickSize", 1, GL_FLOAT_VEC2, { 1.0, 0.3, 0, 0 }, -1 }, + { "BrickPct", 1, GL_FLOAT_VEC2, { 0.9, 0.8, 0, 0 }, -1 }, END_OF_UNIFORMS }; @@ -148,7 +148,8 @@ Init(void) glUseProgram(program); - InitUniforms(program, Uniforms); + SetUniformValues(program, Uniforms); + PrintUniforms(Uniforms); assert(glGetError() == 0); @@ -183,7 +184,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]); |