Browse Source

sceneconverter: don't sort mesh attributes by the offset.

What a stupid idea, cuz now it's impossible to know which attribute has
which ID, so using --only-attributes is just a total guesswork,
resulting in meshes that have no positions or other nightmare scenarios.

NOT a good idea, past mosra.

By the way, removing the std::sort() stripped 16 kB off the release
binary size (178 kB before, 162 after). Fancy, C++, very fancy.
pull/539/head
Vladimír Vondruš 4 years ago
parent
commit
047fd33817
  1. 6
      src/Magnum/SceneTools/sceneconverter.cpp

6
src/Magnum/SceneTools/sceneconverter.cpp

@ -23,7 +23,6 @@
DEALINGS IN THE SOFTWARE.
*/
#include <algorithm>
#include <set>
#include <sstream>
#include <Corrade/Containers/Optional.h>
@ -651,11 +650,6 @@ used.)")
bounds);
}
std::sort(info.attributes.begin(), info.attributes.end(),
[](const MeshAttributeInfo& a, const MeshAttributeInfo& b) {
return a.offset < b.offset;
});
arrayAppend(meshInfos, std::move(info));
}
}

Loading…
Cancel
Save