|
|
|
|
@ -45,6 +45,13 @@ Trade::MeshData combineIndexedImplementation(
|
|
|
|
|
#endif |
|
|
|
|
const MeshPrimitive primitive, const Containers::StridedArrayView2D<char>& combinedIndices, const Containers::Iterable<const Trade::MeshData>& meshes) |
|
|
|
|
{ |
|
|
|
|
/* Make the combined index array unique */ |
|
|
|
|
Containers::Array<char> indexData{NoInit, combinedIndices.size()[0]*sizeof(UnsignedInt)}; |
|
|
|
|
const auto indexDataI = Containers::arrayCast<UnsignedInt>(indexData); |
|
|
|
|
const UnsignedInt vertexCount = removeDuplicatesInPlaceInto( |
|
|
|
|
combinedIndices, |
|
|
|
|
indexDataI); |
|
|
|
|
|
|
|
|
|
/* Calculate attribute count and vertex stride */ |
|
|
|
|
UnsignedInt attributeCount = 0; |
|
|
|
|
UnsignedInt vertexStride = 0; |
|
|
|
|
@ -60,13 +67,6 @@ Trade::MeshData combineIndexedImplementation(
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Make the combined index array unique */ |
|
|
|
|
Containers::Array<char> indexData{NoInit, combinedIndices.size()[0]*sizeof(UnsignedInt)}; |
|
|
|
|
const auto indexDataI = Containers::arrayCast<UnsignedInt>(indexData); |
|
|
|
|
const UnsignedInt vertexCount = removeDuplicatesInPlaceInto( |
|
|
|
|
combinedIndices, |
|
|
|
|
indexDataI); |
|
|
|
|
|
|
|
|
|
/* Allocate resulting attribute and vertex data and duplicate the
|
|
|
|
|
attributes there according to the combined index buffer */ |
|
|
|
|
Containers::Array<char> vertexData{NoInit, vertexStride*vertexCount}; |
|
|
|
|
|