From 6a97fa2fed8a952725021e82bfb0fb65d0739593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 25 May 2020 21:23:13 +0200 Subject: [PATCH] MeshTools: drop now-obsolete special case for attrib-less meshes. It was incomplete, asserting in some cases anyway. --- src/Magnum/MeshTools/Interleave.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/Magnum/MeshTools/Interleave.cpp b/src/Magnum/MeshTools/Interleave.cpp index 1c140c0f2..ae0c0e631 100644 --- a/src/Magnum/MeshTools/Interleave.cpp +++ b/src/Magnum/MeshTools/Interleave.cpp @@ -248,13 +248,6 @@ Trade::MeshData interleavedLayout(const Trade::MeshData& data, const UnsignedInt } Trade::MeshData interleave(Trade::MeshData&& data, const Containers::ArrayView extra) { - /* If there are no attributes and no index buffer, bail -- the vertex count - is the only property we can transfer. If this wouldn't be done, the - return at the end would assert as vertex count is only passed implicitly - via attributes (which there are none). */ - if(!data.attributeCount() && extra.empty() && !data.isIndexed()) - return Trade::MeshData{data.primitive(), data.vertexCount()}; - /* Transfer the indices unchanged, in case the mesh is indexed */ Containers::Array indexData; Trade::MeshIndexData indices; @@ -272,6 +265,7 @@ Trade::MeshData interleave(Trade::MeshData&& data, const Containers::ArrayView attribute = Containers::arrayCast<2, const char>(extra[i].data(), vertexFormatSize(extra[i].format())); @@ -322,7 +316,7 @@ Trade::MeshData interleave(Trade::MeshData&& data, const Containers::ArrayView extra) {