libc3: remerged
[simavr] / examples / shared / libc3 / src / c3stl.c
index c42709b..9183f6d 100644 (file)
@@ -3,20 +3,20 @@
 
        Copyright 2008-2012 Michel Pollet <buserror@gmail.com>
 
-       This file is part of simavr.
+       This file is part of libc3.
 
-       simavr is free software: you can redistribute it and/or modify
+       libc3 is free software: you can redistribute it and/or modify
        it under the terms of the GNU General Public License as published by
        the Free Software Foundation, either version 3 of the License, or
        (at your option) any later version.
 
-       simavr is distributed in the hope that it will be useful,
+       libc3 is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU General Public License for more details.
 
        You should have received a copy of the GNU General Public License
-       along with simavr.  If not, see <http://www.gnu.org/licenses/>.
+       along with libc3.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include <stdio.h>
@@ -97,6 +97,7 @@ c3stl_load(
                                if (!strncmp(keyword, "facet ", 6)) {
                                        c3vec3 normal;
                                        _c3stl_read_vertex(keyword + 6, &normal);
+                                       normal = c3vec3_normalize(normal);
                                        c3vertex_array_add(&current_g->normals, normal);
                                        c3vertex_array_add(&current_g->normals, normal);
                                        c3vertex_array_add(&current_g->normals, normal);