Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qsgmapboxglnode.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// Copyright (C) 2017 Mapbox, Inc.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QSGMAPBOXGLNODE_H
6#define QSGMAPBOXGLNODE_H
7
8#include <QtQuick/QQuickWindow>
9#include <QtQuick/QSGRenderNode>
10#include <QtQuick/QSGSimpleTextureNode>
11#include <QtOpenGL/QOpenGLFramebufferObject>
12
13#include <QMapboxGL>
14
15class QGeoMapMapboxGL;
16
18{
19public:
20 QSGMapboxGLTextureNode(const QMapboxGLSettings &, const QSize &, qreal pixelRatio, QGeoMapMapboxGL *geoMap);
21
22 QMapboxGL* map() const;
23
24 void resize(const QSize &size, qreal pixelRatio);
25 void render(QQuickWindow *);
26
27private:
28 std::unique_ptr<QMapboxGL> m_map;
29 std::unique_ptr<QOpenGLFramebufferObject> m_fbo;
30};
31
33{
34public:
35 QSGMapboxGLRenderNode(const QMapboxGLSettings &, const QSize &, qreal pixelRatio, QGeoMapMapboxGL *geoMap);
36
37 QMapboxGL* map() const;
38
39 // QSGRenderNode
40 void render(const RenderState *state) override;
41 StateFlags changedStates() const override;
42
43private:
44 std::unique_ptr<QMapboxGL> m_map;
45};
46
47#endif // QSGMAPBOXGLNODE_H
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
StateFlags changedStates() const override
When the underlying rendering API is OpenGL, this function should return a mask where each bit repres...
void render(const RenderState *state) override
This function is called by the renderer and should paint this node with directly invoking commands in...
QMapboxGL * map() const
QSGMapboxGLRenderNode(const QMapboxGLSettings &, const QSize &, qreal pixelRatio, QGeoMapMapboxGL *geoMap)
void render(QQuickWindow *)
QSGMapboxGLTextureNode(const QMapboxGLSettings &, const QSize &, qreal pixelRatio, QGeoMapMapboxGL *geoMap)
void resize(const QSize &size, qreal pixelRatio)
QMapboxGL * map() const
The QSGRenderNode class represents a set of custom rendering commands targeting the graphics API that...
The QSGSimpleTextureNode class is provided for convenience to easily draw textured content using the ...
\inmodule QtCore
Definition qsize.h:25
else opt state
[0]
GLenum GLuint GLintptr GLsizeiptr size
[1]
double qreal
Definition qtypes.h:187