diff --git a/src/Magnum/Trade/MeshData.h b/src/Magnum/Trade/MeshData.h index 440e2b198..08107dea6 100644 --- a/src/Magnum/Trade/MeshData.h +++ b/src/Magnum/Trade/MeshData.h @@ -1789,7 +1789,7 @@ class MAGNUM_TRADE_EXPORT MeshData { Containers::StridedArrayView1D attributeDataViewInternal(const MeshAttributeData& attribute) const; #ifndef CORRADE_NO_ASSERT - template bool checkAttributeTypeCompatibility(const MeshAttributeData& attribute, const char* prefix) const; + template bool checkVertexFormatCompatibility(const MeshAttributeData& attribute, const char* prefix) const; #endif /* GPUs don't currently support more than 32-bit index types / vertex @@ -2138,7 +2138,7 @@ template Containers::ArrayView MeshData::mutableIndices() { } #ifndef CORRADE_NO_ASSERT -template bool MeshData::checkAttributeTypeCompatibility(const MeshAttributeData& attribute, const char* const prefix) const { +template bool MeshData::checkVertexFormatCompatibility(const MeshAttributeData& attribute, const char* const prefix) const { CORRADE_ASSERT(!isVertexFormatImplementationSpecific(attribute._format), prefix << "can't cast data from an implementation-specific vertex format" << reinterpret_cast(vertexFormatUnwrap(attribute._format)), false); CORRADE_ASSERT(Implementation::isVertexFormatCompatible::type>(attribute._format), @@ -2155,7 +2155,7 @@ template Containers::StridedArrayView1D MeshData::attri if(!data.stride()[1]) return {}; #endif #ifndef CORRADE_NO_ASSERT - if(!checkAttributeTypeCompatibility(_attributes[id], "Trade::MeshData::attribute():")) return {}; + if(!checkVertexFormatCompatibility(_attributes[id], "Trade::MeshData::attribute():")) return {}; #endif return Containers::arrayCast<1, const T>(data); } @@ -2167,7 +2167,7 @@ template Containers::StridedArrayView2D(attribute, "Trade::MeshData::attribute():")) return {}; + if(!checkVertexFormatCompatibility(attribute, "Trade::MeshData::attribute():")) return {}; #endif return Containers::arrayCast<2, const typename std::remove_extent::type>(data); } @@ -2178,7 +2178,7 @@ template Containers::StridedArrayView1D MeshData::mutableAttr if(!data.stride()[1]) return {}; #endif #ifndef CORRADE_NO_ASSERT - if(!checkAttributeTypeCompatibility(_attributes[id], "Trade::MeshData::mutableAttribute():")) return {}; + if(!checkVertexFormatCompatibility(_attributes[id], "Trade::MeshData::mutableAttribute():")) return {}; #endif return Containers::arrayCast<1, T>(data); } @@ -2190,7 +2190,7 @@ template Containers::StridedArrayView2D(attribute, "Trade::MeshData::mutableAttribute():")) return {}; + if(!checkVertexFormatCompatibility(attribute, "Trade::MeshData::mutableAttribute():")) return {}; #endif return Containers::arrayCast<2, typename std::remove_extent::type>(data); } @@ -2201,7 +2201,7 @@ template Containers::StridedArrayView1D MeshData::attri if(!data.stride()[1]) return {}; #endif #ifndef CORRADE_NO_ASSERT - if(!checkAttributeTypeCompatibility(_attributes[attributeFor(name, id)], "Trade::MeshData::attribute():")) return {}; + if(!checkVertexFormatCompatibility(_attributes[attributeFor(name, id)], "Trade::MeshData::attribute():")) return {}; #endif return Containers::arrayCast<1, const T>(data); } @@ -2213,7 +2213,7 @@ template Containers::StridedArrayView2D(attribute, "Trade::MeshData::attribute():")) return {}; + if(!checkVertexFormatCompatibility(attribute, "Trade::MeshData::attribute():")) return {}; #endif return Containers::arrayCast<2, const typename std::remove_extent::type>(data); } @@ -2224,7 +2224,7 @@ template Containers::StridedArrayView1D MeshData::mutableAttr if(!data.stride()[1]) return {}; #endif #ifndef CORRADE_NO_ASSERT - if(!checkAttributeTypeCompatibility(_attributes[attributeFor(name, id)], "Trade::MeshData::mutableAttribute():")) return {}; + if(!checkVertexFormatCompatibility(_attributes[attributeFor(name, id)], "Trade::MeshData::mutableAttribute():")) return {}; #endif return Containers::arrayCast<1, T>(data); } @@ -2236,7 +2236,7 @@ template Containers::StridedArrayView2D(attribute, "Trade::MeshData::mutableAttribute():")) return {}; + if(!checkVertexFormatCompatibility(attribute, "Trade::MeshData::mutableAttribute():")) return {}; #endif return Containers::arrayCast<2, typename std::remove_extent::type>(data); }