Fix compilation of demos/shapes
authorSylvain Beucler <beuc@beuc.net>
Sat, 9 Jun 2012 17:38:24 +0000 (17:38 +0000)
committerSylvain Beucler <beuc@beuc.net>
Sat, 9 Jun 2012 17:38:24 +0000 (17:38 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1334 7f0cb862-5218-0410-a997-914c9d46530a

CMakeLists.txt
progs/demos/shapes/shapes.c

index f038c2d..a3217a2 100644 (file)
@@ -402,7 +402,9 @@ ADD_DEMO(Lorenz          progs/demos/Lorenz/lorenz.c)
 ADD_DEMO(One             progs/demos/One/one.c)
 ADD_DEMO(Resizer         progs/demos/Resizer/Resizer.cpp)
 ADD_DEMO(multi-touch     progs/demos/multi-touch/multi-touch.c)
-ADD_DEMO(shapes          progs/demos/shapes/shapes.c)
+ADD_DEMO(shapes          progs/demos/shapes/shapes.c
+                         progs/demos/shapes/glmatrix.h
+                         progs/demos/shapes/glmatrix.c)
 ADD_DEMO(smooth_opengl3  progs/demos/smooth_opengl3/smooth_opengl3.c)
 IF(UNIX)
     ADD_DEMO(spaceball       progs/demos/spaceball/spaceball.c
index e984d29..da454e9 100644 (file)
@@ -357,11 +357,11 @@ void initShader(void)
 
     gl_UseProgram (program);
 
-    attribute_fg_coord      = getAttribOrUniformLocation("fg_coord"         , program, TRUE);
-    attribute_fg_normal     = getAttribOrUniformLocation("fg_normal"        , program, TRUE);
-    uniform_m               = getAttribOrUniformLocation("m"                , program, FALSE);
-    uniform_p               = getAttribOrUniformLocation("p"                , program, FALSE);
-    uniform_m_3x3_inv_transp= getAttribOrUniformLocation("m_3x3_inv_transp" , program, FALSE);
+    attribute_fg_coord      = getAttribOrUniformLocation("fg_coord"         , program, GL_TRUE);
+    attribute_fg_normal     = getAttribOrUniformLocation("fg_normal"        , program, GL_TRUE);
+    uniform_m               = getAttribOrUniformLocation("m"                , program, GL_FALSE);
+    uniform_p               = getAttribOrUniformLocation("p"                , program, GL_FALSE);
+    uniform_m_3x3_inv_transp= getAttribOrUniformLocation("m_3x3_inv_transp" , program, GL_FALSE);
 
     gl_UseProgram (0);