Fix mesh primitive’s attributes’ names

Per spec

TEXCOORD -> TEXCOORD_0
COLOR -> COLOR_0
JOINTS -> JOINTS_0
WEIGHTS -> WEIGHTS_0

Remove JOINTMATRIX since it’s not supported (and doesn’t seem to be output, anyway)

TANGENT should be added at a later date
pull/1423/head
Daniel Hritzkiv 2017-09-08 15:54:03 -04:00
parent 816e6909ca
commit 990fe143a1
No known key found for this signature in database
GPG Key ID: D1D19875679D5CBF
1 changed files with 4 additions and 5 deletions

View File

@ -380,11 +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", true);
WriteAttrs(w, attrs, p.attributes.color, "COLOR");
WriteAttrs(w, attrs, p.attributes.joint, "JOINT");
WriteAttrs(w, attrs, p.attributes.jointmatrix, "JOINTMATRIX");
WriteAttrs(w, attrs, p.attributes.weight, "WEIGHT");
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");
}
prim.AddMember("attributes", attrs, w.mAl);
}