From d4cb498d7abc612029c575fb290eb649a4697d57 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 21 Jul 2017 16:36:31 -0700 Subject: [all] Merge View into RendererBackend --- include/mbgl/renderer/renderer_backend.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/mbgl/renderer/renderer_backend.hpp') 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 #include #include #include @@ -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, -- cgit v1.2.1