summaryrefslogtreecommitdiff
path: root/platform/qt/src/qmapboxgl_renderer_backend.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/qt/src/qmapboxgl_renderer_backend.hpp')
-rw-r--r--platform/qt/src/qmapboxgl_renderer_backend.hpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/platform/qt/src/qmapboxgl_renderer_backend.hpp b/platform/qt/src/qmapboxgl_renderer_backend.hpp
new file mode 100644
index 0000000000..de66b035fc
--- /dev/null
+++ b/platform/qt/src/qmapboxgl_renderer_backend.hpp
@@ -0,0 +1,34 @@
+#pragma once
+
+#include "qmapboxgl.hpp"
+
+#include <mbgl/renderer/renderer_backend.hpp>
+#include <mbgl/storage/default_file_source.hpp>
+#include <mbgl/util/shared_thread_pool.hpp>
+
+class QMapboxGLRendererBackend : public mbgl::RendererBackend
+{
+public:
+ QMapboxGLRendererBackend() = default;
+ virtual ~QMapboxGLRendererBackend() = default;
+
+ // mbgl::RendererBackend implementation
+ void updateAssumedState() final;
+ void bind() final;
+ mbgl::Size getFramebufferSize() const final;
+
+ void updateFramebuffer(quint32 fbo, const mbgl::Size &);
+
+protected:
+ mbgl::gl::ProcAddress getExtensionFunctionPointer(const char*) final;
+
+ // No-op, implicit mode.
+ void activate() final {}
+ void deactivate() final {}
+
+private:
+ quint32 m_fbo = 0;
+ mbgl::Size m_size = { 0, 0 };
+
+ Q_DISABLE_COPY(QMapboxGLRendererBackend)
+};