diff --git a/src/core/map.cpp b/src/core/map.cpp index e768e1b..fbac15c 100644 --- a/src/core/map.cpp +++ b/src/core/map.cpp @@ -1541,9 +1541,9 @@ void Map::render() { } /*! - \brief Set the framebuffer object. - \param fbo The framebuffer object ID. - \param size The framebuffer size. + \brief Set the OpenGL framebuffer object. + \param fbo The OpenGL framebuffer object ID. + \param size The OpenGL framebuffer size. If MapLibre Native needs to rebind the default \a fbo, it will use the ID supplied here. \a size is the size of the framebuffer, which @@ -1551,8 +1551,8 @@ void Map::render() { Must be called on the render thread. */ -void Map::setFramebufferObject(quint32 fbo, const QSize &size) { - d_ptr->setFramebufferObject(fbo, size); +void Map::setOpenGLFramebufferObject(quint32 fbo, const QSize &size) { + d_ptr->setOpenGLFramebufferObject(fbo, size); } /*! @@ -1729,7 +1729,7 @@ void MapPrivate::render() { m_mapRenderer->render(); } -void MapPrivate::setFramebufferObject(quint32 fbo, const QSize &size) { +void MapPrivate::setOpenGLFramebufferObject(quint32 fbo, const QSize &size) { const std::lock_guard lock(m_mapRendererMutex); if (m_mapRenderer == nullptr) { diff --git a/src/core/map.hpp b/src/core/map.hpp index cd56996..6654867 100644 --- a/src/core/map.hpp +++ b/src/core/map.hpp @@ -173,7 +173,7 @@ class Q_MAPLIBRE_CORE_EXPORT Map : public QObject { // should be called on the render thread. void createRenderer(); void destroyRenderer(); - void setFramebufferObject(quint32 fbo, const QSize &size); + void setOpenGLFramebufferObject(quint32 fbo, const QSize &size); public slots: void render(); diff --git a/src/core/map_p.hpp b/src/core/map_p.hpp index 9ca0c7e..d8930b7 100644 --- a/src/core/map_p.hpp +++ b/src/core/map_p.hpp @@ -39,7 +39,7 @@ class MapPrivate : public QObject, public mbgl::RendererFrontend { void createRenderer(); void destroyRenderer(); void render(); - void setFramebufferObject(quint32 fbo, const QSize &size); + void setOpenGLFramebufferObject(quint32 fbo, const QSize &size); using PropertySetter = std::optional (mbgl::style::Layer::*)( const std::string &, const mbgl::style::conversion::Convertible &); diff --git a/src/location/texture_node.cpp b/src/location/texture_node.cpp index bc1d102..d1a8851 100644 --- a/src/location/texture_node.cpp +++ b/src/location/texture_node.cpp @@ -43,7 +43,7 @@ void TextureNode::resize(const QSize &size, qreal pixelRatio) m_map->resize(minSize); m_fbo = std::make_unique(fbSize, QOpenGLFramebufferObject::CombinedDepthStencil); - m_map->setFramebufferObject(m_fbo->handle(), fbSize); + m_map->setOpenGLFramebufferObject(m_fbo->handle(), fbSize); #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) setTexture(QNativeInterface::QSGOpenGLTexture::fromNative( diff --git a/src/widgets/gl_widget.cpp b/src/widgets/gl_widget.cpp index 7ee488a..6c4c07f 100644 --- a/src/widgets/gl_widget.cpp +++ b/src/widgets/gl_widget.cpp @@ -133,7 +133,7 @@ void GLWidget::initializeGL() { */ void GLWidget::paintGL() { d_ptr->m_map->resize(size()); - d_ptr->m_map->setFramebufferObject(defaultFramebufferObject(), size() * devicePixelRatioF()); + d_ptr->m_map->setOpenGLFramebufferObject(defaultFramebufferObject(), size() * devicePixelRatioF()); d_ptr->m_map->render(); } diff --git a/test/core/map_tester.cpp b/test/core/map_tester.cpp index 8f84e51..bc0d5f9 100644 --- a/test/core/map_tester.cpp +++ b/test/core/map_tester.cpp @@ -18,7 +18,7 @@ MapTester::MapTester() connect(&map, &Map::mapChanged, this, &MapTester::onMapChanged); connect(&map, &Map::needsRendering, this, &MapTester::onNeedsRendering); map.resize(size); - map.setFramebufferObject(widget.defaultFramebufferObject(), size); + map.setOpenGLFramebufferObject(widget.defaultFramebufferObject(), size); map.setCoordinateZoom(Coordinate(60.170448, 24.942046), 14); widget.show(); }