diff --git a/src/Magnum/Trade/MeshData.h b/src/Magnum/Trade/MeshData.h index 08107dea6..073298fbe 100644 --- a/src/Magnum/Trade/MeshData.h +++ b/src/Magnum/Trade/MeshData.h @@ -2166,8 +2166,7 @@ template Containers::StridedArrayView2D(attribute, "Trade::MeshData::attribute():")) return {}; + if(!checkVertexFormatCompatibility(_attributes[id], "Trade::MeshData::attribute():")) return {}; #endif return Containers::arrayCast<2, const typename std::remove_extent::type>(data); } @@ -2189,8 +2188,7 @@ template Containers::StridedArrayView2D(attribute, "Trade::MeshData::mutableAttribute():")) return {}; + if(!checkVertexFormatCompatibility(_attributes[id], "Trade::MeshData::mutableAttribute():")) return {}; #endif return Containers::arrayCast<2, typename std::remove_extent::type>(data); } @@ -2212,8 +2210,7 @@ template Containers::StridedArrayView2D(attribute, "Trade::MeshData::attribute():")) return {}; + if(!checkVertexFormatCompatibility(_attributes[attributeFor(name, id)], "Trade::MeshData::attribute():")) return {}; #endif return Containers::arrayCast<2, const typename std::remove_extent::type>(data); } @@ -2235,8 +2232,7 @@ template Containers::StridedArrayView2D(attribute, "Trade::MeshData::mutableAttribute():")) return {}; + if(!checkVertexFormatCompatibility(_attributes[attributeFor(name, id)], "Trade::MeshData::mutableAttribute():")) return {}; #endif return Containers::arrayCast<2, typename std::remove_extent::type>(data); }