diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-09-13 14:25:03 +0300 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2017-09-22 23:33:56 +0300 |
commit | 6211db69680e08a1f463ec098ed843ca49a859b2 (patch) | |
tree | 1ea31aa2ec4f6e838e349fd31a77ccb1e2029ccc /src/mbgl/gl/context.hpp | |
parent | e0312ef208797983b8b143f6d104b644493db4b5 (diff) | |
download | qtlocation-mapboxgl-6211db69680e08a1f463ec098ed843ca49a859b2.tar.gz |
[core] allow context to be abandoned on destruction
- This enables the use case where the system already destroyed the underlying GL resources. Otherwise, the cleanup would fail and crash
Diffstat (limited to 'src/mbgl/gl/context.hpp')
-rw-r--r-- | src/mbgl/gl/context.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/gl/context.hpp b/src/mbgl/gl/context.hpp index 228e6e55b7..528113cbba 100644 --- a/src/mbgl/gl/context.hpp +++ b/src/mbgl/gl/context.hpp @@ -190,7 +190,13 @@ public: return vertexArray.get(); } + void setCleanupOnDestruction(bool cleanup) { + cleanupOnDestruction = cleanup; + } + private: + bool cleanupOnDestruction = true; + std::unique_ptr<extension::Debugging> debugging; std::unique_ptr<extension::VertexArray> vertexArray; #if MBGL_HAS_BINARY_PROGRAMS |