diff --git a/doc/source/doxygen-docs/changelog.md b/doc/source/doxygen-docs/changelog.md index ba072bbcf7..64b279da1c 100644 --- a/doc/source/doxygen-docs/changelog.md +++ b/doc/source/doxygen-docs/changelog.md @@ -7,6 +7,8 @@ - \ref mrpt_opengl_grp: - mrpt::opengl::Texture now supports rendering 16-bit images. - mrpt::opengl::CCamera now has a "roll" angle when in orbit-view mode. +- BUG FIXES: + - mrpt::opengl::CMesh: There was a bug with texture scaling with non-square images. # Version 2.14.5: Released Nov 4th, 2024 - Upgraded nanoflann to v1.6.2 (fixes a potential bug). diff --git a/libs/opengl/src/CMesh.cpp b/libs/opengl/src/CMesh.cpp index 1311c53605..5f708d07cd 100644 --- a/libs/opengl/src/CMesh.cpp +++ b/libs/opengl/src/CMesh.cpp @@ -371,7 +371,7 @@ void CMesh::onUpdateBuffers_TexturedTriangles() // Default: texture over the whole extension. const float textureSizeX = (m_textureSize_x != 0) ? m_textureSize_x : (m_xMax - m_xMin); - const float textureSizeY = (m_textureSize_y != 0) ? m_textureSize_y : (m_xMax - m_xMin); + const float textureSizeY = (m_textureSize_y != 0) ? m_textureSize_y : (m_yMax - m_yMin); for (auto& i : actualMesh) {