diff options
author | Leith Bade <leith@mapbox.com> | 2014-12-02 03:43:04 +1100 |
---|---|---|
committer | Leith Bade <leith@mapbox.com> | 2014-12-02 03:43:04 +1100 |
commit | 5ad094e82352721a0ecc789fc414f3eafa40d357 (patch) | |
tree | 9f0e10095b73db8b6b25d6fef879f24890363620 /include/mbgl/platform | |
parent | 2800f361424ee84af283fbe7bb73b5afbe264c6e (diff) | |
download | qtlocation-mapboxgl-5ad094e82352721a0ecc789fc414f3eafa40d357.tar.gz |
Fix iOS compile
Diffstat (limited to 'include/mbgl/platform')
-rw-r--r-- | include/mbgl/platform/gl.hpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/mbgl/platform/gl.hpp b/include/mbgl/platform/gl.hpp index 7dbe667788..a63dd9b1fb 100644 --- a/include/mbgl/platform/gl.hpp +++ b/include/mbgl/platform/gl.hpp @@ -129,17 +129,25 @@ extern PFNGLGENVERTEXARRAYSPROC GenVertexArrays; extern PFNGLISVERTEXARRAYPROC IsVertexArray; -// Debug group markers, useful for debuggin on iOS -#if __APPLE__ && defined(DEBUG) && defined(GL_EXT_debug_marker) +// Debug group markers, useful for debugging on iOS +#if defined(DEBUG) // static int indent = 0; inline void start_group(const std::string &str) { - glPushGroupMarkerEXT(0, str.c_str()); + if (gl::PushDebugGroup != nullptr) { + gl::PushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, str.size(), str.c_str()); + } else if (gl::PushGroupMarkerEXT != nullptr) { + gl::PushGroupMarkerEXT(str.size(), str.c_str()); + } // fprintf(stderr, "%s%s\n", std::string(indent * 4, ' ').c_str(), str.c_str()); // indent++; } inline void end_group() { - glPopGroupMarkerEXT(); + if (gl::PopDebugGroup != nullptr) { + gl::PopDebugGroup(); + } else if (gl::PopGroupMarkerEXT != nullptr) { + gl::PopGroupMarkerEXT(); + } // indent--; } #else |