diff --git a/doc/changelog.dox b/doc/changelog.dox index 041a05009..db37a6b24 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -297,6 +297,8 @@ See also: (see [mosra/magnum#331](https://github.com/mosra/magnum/pull/331) - Reading of float textures on ES3 contexts using @ref DebugTools::textureSubImage() returned a zero-sized image by accident +- @ref MeshTools::compile() was producing an incorrect mesh when + @ref Trade::MeshData3D had both colors and texture coordinates - Properly zero-initializing the UTF-8 buffer in @ref Platform::GlfwApplication::textInputEvent() (see [mosra/magnum#324](https://github.com/mosra/magnum/pull/324)) diff --git a/src/Magnum/MeshTools/Compile.cpp b/src/Magnum/MeshTools/Compile.cpp index 88b677746..136cd25a8 100644 --- a/src/Magnum/MeshTools/Compile.cpp +++ b/src/Magnum/MeshTools/Compile.cpp @@ -137,7 +137,7 @@ GL::Mesh compile(const Trade::MeshData3D& meshData) { } if(meshData.hasTextureCoords2D()) { stride += sizeof(Shaders::Generic3D::TextureCoordinates::Type); - colorsOffset += sizeof(Shaders::Generic3D::Normal::Type); + colorsOffset += sizeof(Shaders::Generic3D::TextureCoordinates::Type); } if(meshData.hasColors()) stride += sizeof(Shaders::Generic3D::Color4::Type);