Use `forceNumber` argument of `WriteAttrs` to write correct attribute names, instead
authorDaniel Hritzkiv <daniel.hritzkiv@gmail.com>
Fri, 8 Sep 2017 19:58:09 +0000 (15:58 -0400)
committerDaniel Hritzkiv <daniel.hritzkiv@gmail.com>
Mon, 11 Sep 2017 15:02:16 +0000 (11:02 -0400)
code/glTF2AssetWriter.inl

index ed599c2..c91313a 100644 (file)
@@ -380,10 +380,10 @@ namespace glTF2 {
                 {
                     WriteAttrs(w, attrs, p.attributes.position, "POSITION");
                     WriteAttrs(w, attrs, p.attributes.normal, "NORMAL");
-                    WriteAttrs(w, attrs, p.attributes.texcoord, "TEXCOORD_0", true);
-                    WriteAttrs(w, attrs, p.attributes.color, "COLOR_0");
-                    WriteAttrs(w, attrs, p.attributes.joint, "JOINTS_0");
-                    WriteAttrs(w, attrs, p.attributes.weight, "WEIGHTS_0");
+                    WriteAttrs(w, attrs, p.attributes.texcoord, "TEXCOORD", true);
+                    WriteAttrs(w, attrs, p.attributes.color, "COLOR", true);
+                    WriteAttrs(w, attrs, p.attributes.joint, "JOINTS", true);
+                    WriteAttrs(w, attrs, p.attributes.weight, "WEIGHTS", true);
                 }
                 prim.AddMember("attributes", attrs, w.mAl);
             }