ColladaParser: don't arbitrarily limit number of per-vertex attributes.
parent
ca3ce4703d
commit
8dead93504
|
@ -2168,9 +2168,9 @@ void ColladaParser::CopyVertex(size_t currentVertex, size_t numOffsets, size_t n
|
||||||
size_t maxIndexRequested = currentPrimitive * numOffsets * numPoints + (currentVertex + 1) * numOffsets - 1;
|
size_t maxIndexRequested = currentPrimitive * numOffsets * numPoints + (currentVertex + 1) * numOffsets - 1;
|
||||||
ai_assert(maxIndexRequested < indices.size());
|
ai_assert(maxIndexRequested < indices.size());
|
||||||
|
|
||||||
// read all indices for this vertex. Yes, in a hacky local array
|
// copy the indices pertaining to this vertex
|
||||||
ai_assert(numOffsets < 20 && perVertexOffset < 20);
|
std::vector<size_t> vindex;
|
||||||
size_t vindex[20];
|
vindex.reserve(numOffsets);
|
||||||
|
|
||||||
for (size_t offsets = 0; offsets < numOffsets; ++offsets)
|
for (size_t offsets = 0; offsets < numOffsets; ++offsets)
|
||||||
vindex[offsets] = indices[currentPrimitive * numOffsets * numPoints + currentVertex * numOffsets + offsets];
|
vindex[offsets] = indices[currentPrimitive * numOffsets * numPoints + currentVertex * numOffsets + offsets];
|
||||||
|
|
Loading…
Reference in New Issue