From 3503041e3e9722741afd4e8e7e01293f77848797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 16 Jan 2022 18:14:36 +0100 Subject: [PATCH] sceneconverter: display also mesh index offset and stride in --info. --- src/Magnum/SceneTools/sceneconverter.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Magnum/SceneTools/sceneconverter.cpp b/src/Magnum/SceneTools/sceneconverter.cpp index b0cbe0a7f..49d207125 100644 --- a/src/Magnum/SceneTools/sceneconverter.cpp +++ b/src/Magnum/SceneTools/sceneconverter.cpp @@ -378,6 +378,8 @@ used.)") UnsignedInt mesh, level; MeshPrimitive primitive; UnsignedInt indexCount, vertexCount; + std::size_t indexOffset; + Int indexStride; MeshIndexType indexType; Containers::Array attributes; std::size_t indexDataSize, vertexDataSize; @@ -595,6 +597,8 @@ used.)") if(mesh->isIndexed()) { info.indexCount = mesh->indexCount(); info.indexType = mesh->indexType(); + info.indexOffset = mesh->indexOffset(); + info.indexStride = mesh->indexStride(); info.indexDataSize = mesh->indexData().size(); } for(UnsignedInt k = 0; k != mesh->attributeCount(); ++k) { @@ -901,8 +905,8 @@ used.)") << Utility::formatString("{:.1f}", info.vertexDataSize/1024.0f) << "kB)"; if(info.indexType != MeshIndexType{}) { - d << Debug::newline << " " << info.indexCount << "indices @" - << info.indexType << "(" << Debug::nospace + d << Debug::newline << " " << info.indexCount << "indices, offset" << info.indexOffset << "@" + << info.indexType << Debug::nospace << ", stride" << info.indexStride << "(" << Debug::nospace << Utility::formatString("{:.1f}", info.indexDataSize/1024.0f) << "kB)"; }