summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp')
-rw-r--r--src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
index 3f31997c..82aa868f 100644
--- a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
+++ b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
@@ -88,10 +88,16 @@ void QSGMapboxGLTextureNode::render(QQuickWindow *window)
QOpenGLFunctions *f = window->openglContext()->functions();
f->glViewport(0, 0, m_fbo->width(), m_fbo->height());
+ GLint alignment;
+ f->glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
+
m_fbo->bind();
m_map->render();
m_fbo->release();
+ // QTBUG-62861
+ f->glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);
+
window->resetOpenGLState();
markDirty(QSGNode::DirtyMaterial);
}
@@ -125,7 +131,13 @@ void QSGMapboxGLRenderNode::render(const RenderState *state)
f->glScissor(state->scissorRect().x(), state->scissorRect().y(), state->scissorRect().width(), state->scissorRect().height());
f->glEnable(GL_SCISSOR_TEST);
+ GLint alignment;
+ f->glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
+
m_map->render();
+
+ // QTBUG-62861
+ f->glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);
}
QSGRenderNode::StateFlags QSGMapboxGLRenderNode::changedStates() const