summaryrefslogtreecommitdiff
path: root/include/mbgl/platform
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-08-17 15:55:51 +0300
committerThiago Marcos P. Santos <thiago@mapbox.com>2016-08-22 16:52:02 +0300
commit547af7475ef0004cbf7542a57e23de62e8590cc3 (patch)
tree5504a40458744ec23ea04c4539fe4e56ba430101 /include/mbgl/platform
parent6761b325fb18ff31a05177678d8a0ad81c5c0d81 (diff)
downloadqtlocation-mapboxgl-547af7475ef0004cbf7542a57e23de62e8590cc3.tar.gz
[Qt] Implement a Qt headless renderer
Using legacy QGLWidget because we support Qt4.
Diffstat (limited to 'include/mbgl/platform')
-rw-r--r--include/mbgl/platform/default/headless_view.hpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/mbgl/platform/default/headless_view.hpp b/include/mbgl/platform/default/headless_view.hpp
index e3acc8e379..989c226694 100644
--- a/include/mbgl/platform/default/headless_view.hpp
+++ b/include/mbgl/platform/default/headless_view.hpp
@@ -1,6 +1,9 @@
#pragma once
-#ifdef __APPLE__
+#if defined(__QT__)
+#define MBGL_USE_QT 1
+class QGLWidget;
+#elif defined(__APPLE__)
#include <TargetConditionals.h>
#if TARGET_OS_IOS
#define MBGL_USE_EAGL 1
@@ -63,6 +66,10 @@ private:
bool extensionsLoaded = false;
bool active = false;
+#if MBGL_USE_QT
+ QGLWidget* glContext = nullptr;
+#endif
+
#if MBGL_USE_CGL
CGLContextObj glContext = nullptr;
#endif