From 362138160df3d7a35b35bb9a7b2be1de8f825b49 Mon Sep 17 00:00:00 2001 From: "S. Kozyr" Date: Tue, 3 Dec 2024 15:07:22 +0200 Subject: [PATCH] Added comments to new lines. Added reference to the PR Signed-off-by: S. Kozyr --- qt/qt_common/map_widget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qt/qt_common/map_widget.cpp b/qt/qt_common/map_widget.cpp index 0395988cff..7d7ab8f432 100644 --- a/qt/qt_common/map_widget.cpp +++ b/qt/qt_common/map_widget.cpp @@ -268,8 +268,10 @@ void MapWidget::Build() QVector4D(1.0, -1.0, 1.0, 0.0)}; m_vbo->allocate(static_cast(vertices), sizeof(vertices)); QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions(); + // 0-index of the buffer is linked to "a_position" attribute in vertex shader. + // Introduced in https://github.com/organicmaps/organicmaps/pull/9814 f->glEnableVertexAttribArray(0); - f->glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 4 * sizeof(GLfloat), nullptr); + f->glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, sizeof(QVector4D), nullptr); m_vbo->release(); m_program->release();