Hello,
I noticed a bug in the deindexer sample. It works if the accessors look like
<input semantic="VERTEX" source="#Cone01-obj-vertex" offset="0"></input>
<input semantic="NORMAL" source="#Cone01-obj-normal" offset="1"></input>
<input semantic="TEXCOORD" source="#Cone01-obj-mapchan-1" offset="2" set="1"></input>
but if it looks like
<input semantic="VERTEX" source="#Cone01-obj-vertex" offset="0"></input>
<input semantic="NORMAL" source="#Cone01-obj-normal" offset="0"></input>
<input semantic="TEXCOORD" source="#Cone01-obj-mapchan-1" offset="1" set="1"></input>
then the code fails, because the maximum offset (1) is not identical to the number of inputs (3). It fails at this line:
myVertexIndex.indices[k] = thisTriangles->getP()->getValue()[currentTriangleIndex + k];
Here it needs to access something like
myVertexIndex.indices[k] = thisTriangles->getP()->getValue()[currentTriangleIndex + inputs[k].offset];
Without it the app crashes. You get this kind of offsets when you are exporting with the 3ds max exporter with tangents/binormals turned on for example.
-Matthias