diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-10-19 14:57:13 -0700 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2017-10-25 18:08:28 +0300 |
commit | 9d87dc8cf17f00eb6a8aadc0612972d63dd7f6e3 (patch) | |
tree | 27de0e27076a8b00b560c923b3b46fb6c61890cb /platform/qt | |
parent | 5fa4790fdc24622d85db5fc503bcca9fe8c40b60 (diff) | |
download | qtlocation-mapboxgl-9d87dc8cf17f00eb6a8aadc0612972d63dd7f6e3.tar.gz |
[core] Make the OpenGL implementation platform specific
Split the headers, so each platform includes the most appropriated
header.
Diffstat (limited to 'platform/qt')
-rw-r--r-- | platform/qt/config.cmake | 5 | ||||
-rw-r--r-- | platform/qt/mbgl/gl/gl_impl.hpp | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/platform/qt/config.cmake b/platform/qt/config.cmake index a7fdbf3542..e3b15fddfd 100644 --- a/platform/qt/config.cmake +++ b/platform/qt/config.cmake @@ -20,6 +20,7 @@ macro(mbgl_platform_core) target_include_directories(mbgl-core PUBLIC platform/default + PRIVATE platform/qt PRIVATE platform/qt/include ) @@ -69,6 +70,10 @@ macro(mbgl_platform_test) PRIVATE platform/qt/test/qmapboxgl.test.cpp ) + target_include_directories(mbgl-test + PRIVATE platform/qt + ) + set_source_files_properties( platform/qt/test/main.cpp PROPERTIES COMPILE_FLAGS -DWORK_DIRECTORY="${CMAKE_SOURCE_DIR}" diff --git a/platform/qt/mbgl/gl/gl_impl.hpp b/platform/qt/mbgl/gl/gl_impl.hpp new file mode 100644 index 0000000000..5e4c6f12af --- /dev/null +++ b/platform/qt/mbgl/gl/gl_impl.hpp @@ -0,0 +1,21 @@ +#pragma once + +#include <QtGlobal> + +// Qt4 +#if QT_VERSION < 0x050000 + #if MBGL_USE_GLES2 + #define GL_GLEXT_PROTOTYPES + #include <GLES2/gl2.h> + #include <GLES2/gl2ext.h> + #else + #define GL_GLEXT_PROTOTYPES + #include <GL/gl.h> + #include <GL/glext.h> + #endif + +// Qt5 +#else + #define GL_GLEXT_PROTOTYPES + #include <QtGui/qopengl.h> +#endif |