diff options
Diffstat (limited to 'include/mbgl/map/backend.hpp')
-rw-r--r-- | include/mbgl/map/backend.hpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/mbgl/map/backend.hpp b/include/mbgl/map/backend.hpp index e4a5634b88..c11d094906 100644 --- a/include/mbgl/map/backend.hpp +++ b/include/mbgl/map/backend.hpp @@ -2,13 +2,21 @@ #include <mbgl/map/change.hpp> +#include <memory> + namespace mbgl { -class Map; +namespace gl { +class Context; +} // namespace gl class Backend { public: - virtual ~Backend() = default; + Backend(); + virtual ~Backend(); + + // Returns the backend's context which manages OpenGL state. + gl::Context& getContext(); // Called when the backend's GL context needs to be made active or inactive. These are called, // as a matched pair, in four situations: @@ -29,6 +37,9 @@ public: // Notifies a watcher of map x/y/scale/rotation changes. virtual void notifyMapChange(MapChange change); + +private: + const std::unique_ptr<gl::Context> context; }; } // namespace mbgl |