Browse Source

Trade: properly propagate array size from MeshData::attributeData().

The test now passes again.
pull/537/head
Vladimír Vondruš 5 years ago
parent
commit
c904cd0599
  1. 3
      doc/changelog.dox
  2. 2
      src/Magnum/Trade/MeshData.cpp

3
doc/changelog.dox

@ -469,6 +469,9 @@ See also:
propagate errors when delegating to propagate errors when delegating to
@ref Text::AbstractFontConverter::exportFontToSingleData() / @ref Text::AbstractFontConverter::exportFontToSingleData() /
@ref Text::AbstractFontConverter::exportGlyphCacheToSingleData() @ref Text::AbstractFontConverter::exportGlyphCacheToSingleData()
- @ref Trade::MeshData::attributeData(UnsignedInt) const was not correctly
propagating attribute array size, causing array attributes to appear as
non-array
- Fixed @ref Platform::GlfwApplication, @ref Platform::Sdl2Application and - Fixed @ref Platform::GlfwApplication, @ref Platform::Sdl2Application and
@ref Platform::EmscriptenApplication to correctly print app-specified DPI @ref Platform::EmscriptenApplication to correctly print app-specified DPI
scaling in its verbose output scaling in its verbose output

2
src/Magnum/Trade/MeshData.cpp

@ -268,7 +268,7 @@ MeshAttributeData MeshData::attributeData(const UnsignedInt id) const {
CORRADE_ASSERT(id < _attributes.size(), CORRADE_ASSERT(id < _attributes.size(),
"Trade::MeshData::attributeData(): index" << id << "out of range for" << _attributes.size() << "attributes", MeshAttributeData{}); "Trade::MeshData::attributeData(): index" << id << "out of range for" << _attributes.size() << "attributes", MeshAttributeData{});
const MeshAttributeData& attribute = _attributes[id]; const MeshAttributeData& attribute = _attributes[id];
return MeshAttributeData{attribute._name, attribute._format, attributeDataViewInternal(attribute)}; return MeshAttributeData{attribute._name, attribute._format, attributeDataViewInternal(attribute), attribute._arraySize};
} }
MeshAttribute MeshData::attributeName(const UnsignedInt id) const { MeshAttribute MeshData::attributeName(const UnsignedInt id) const {

Loading…
Cancel
Save