diff options
-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(); |