diff options
author | Liang Qi <liang.qi@qt.io> | 2017-11-15 09:09:41 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-11-15 09:09:41 +0100 |
commit | afc51951769ac7320a98a973bcb95a12bc970019 (patch) | |
tree | f248c33d4a98b2baa047cf8453dd91d6e6545cc8 /src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp | |
parent | 5804d34e3b311dc814c7897894ef7a6b960f0f40 (diff) | |
parent | 8c42dba3910c0bec3134f57bd5fa466df72d7ba7 (diff) | |
download | qtlocation-afc51951769ac7320a98a973bcb95a12bc970019.tar.gz |
Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: Id7d47d95c8dc6a696b79812573e50c572593123e
Diffstat (limited to 'src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp')
-rw-r--r-- | src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp index 82aa868f..7721fe61 100644 --- a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp +++ b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp @@ -68,8 +68,10 @@ void QSGMapboxGLTextureNode::resize(const QSize &size, qreal pixelRatio) m_map->setFramebufferObject(m_fbo->handle()); QSGPlainTexture *fboTexture = static_cast<QSGPlainTexture *>(texture()); - if (!fboTexture) + if (!fboTexture) { fboTexture = new QSGPlainTexture; + fboTexture->setHasAlphaChannel(true); + } fboTexture->setTextureId(m_fbo->texture()); fboTexture->setTextureSize(fbSize); @@ -92,6 +94,11 @@ void QSGMapboxGLTextureNode::render(QQuickWindow *window) f->glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment); m_fbo->bind(); + + f->glClearColor(0.f, 0.f, 0.f, 0.f); + f->glColorMask(true, true, true, true); + f->glClear(GL_COLOR_BUFFER_BIT); + m_map->render(); m_fbo->release(); |