summaryrefslogtreecommitdiff
path: root/include/mbgl/renderer/renderer_backend.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-07-21 16:36:31 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-07-25 12:17:00 -0700
commit8ea2b78b8a06107d84436873256c52309e6ebb7e (patch)
treeb29cb24b6db45cee0124ba92d8157d00c8f4a516 /include/mbgl/renderer/renderer_backend.hpp
parentf49e0f97e21d19f11d74057184713f568cea170b (diff)
downloadqtlocation-mapboxgl-upstream/headless-frontend.tar.gz
[all] Merge View into RendererBackendupstream/headless-frontend
Diffstat (limited to 'include/mbgl/renderer/renderer_backend.hpp')
-rw-r--r--include/mbgl/renderer/renderer_backend.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/mbgl/renderer/renderer_backend.hpp b/include/mbgl/renderer/renderer_backend.hpp
index c12e162fd1..f7d19a1791 100644
--- a/include/mbgl/renderer/renderer_backend.hpp
+++ b/include/mbgl/renderer/renderer_backend.hpp
@@ -1,6 +1,5 @@
#pragma once
-#include <mbgl/map/view.hpp>
#include <mbgl/renderer/backend_scope.hpp>
#include <mbgl/util/image.hpp>
#include <mbgl/util/size.hpp>
@@ -30,6 +29,12 @@ public:
// Called prior to rendering to update the internally assumed OpenGL state.
virtual void updateAssumedState() = 0;
+ // Called when this backend is used for rendering. Implementations should ensure that a renderable
+ // object is bound and glClear/glDraw* calls can be done. They should also make sure that
+ // calling .bind() repeatedly is a no-op and that the appropriate gl::Context values are
+ // set to the current state.
+ virtual void bind() = 0;
+
protected:
// Called with the name of an OpenGL extension that should be loaded. RendererBackend implementations
// must call the API-specific version that obtains the function pointer for this function,