Hello,
please look at the following code:
//Collect total offset
int totalOffset = 0;
for(int j = 0; j < polygonsElement->getInput_array().getCount(); j++)
{
domInputLocalOffset *inputElement =
polygonsElement->getInput_array().get(i);
if(!inputElement) {
continue;
}
totalOffset += inputElement->getOffset();
}
My dae-document looks like this:
<polygons material="lambert1" count="6">
<input semantic="VERTEX" offset="0" source="#pCubeShape1-lib-Vertex"/>
<input semantic="NORMAL" offset="1" source="#pCubeShape1-lib-Normal"/>
<input semantic="TEXCOORD" offset="2" set="0" source="#pCubeShape1-lib-map1"/>
I expected the code above to set totalOffset = 3, but inputElement->getOffset(); returns 0 for all inputElements.
Any ideas what’s wrong with my code?
I need to decode the indices in the p tags in order to store them separate (vertex-, normal-, texcoord-indices)
Regards,
Sebastian Jancke