diff options
Diffstat (limited to 'platform/glfw/glfw_backend.hpp')
-rw-r--r-- | platform/glfw/glfw_backend.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/platform/glfw/glfw_backend.hpp b/platform/glfw/glfw_backend.hpp index 1a2c89ac7a..867e60d79e 100644 --- a/platform/glfw/glfw_backend.hpp +++ b/platform/glfw/glfw_backend.hpp @@ -1,6 +1,7 @@ #pragma once #include <mbgl/util/size.hpp> +#include <mbgl/gfx/backend.hpp> namespace mbgl { namespace gfx { @@ -8,6 +9,8 @@ class RendererBackend; } // namespace gfx } // namespace mbgl +struct GLFWwindow; + class GLFWBackend { public: explicit GLFWBackend() = default; @@ -15,6 +18,10 @@ public: GLFWBackend& operator=(const GLFWBackend&) = delete; virtual ~GLFWBackend() = default; + static std::unique_ptr<GLFWBackend> Create(GLFWwindow* window, bool capFrameRate) { + return mbgl::gfx::Backend::Create<GLFWBackend, GLFWwindow*, bool>(window, capFrameRate); + } + virtual mbgl::gfx::RendererBackend& getRendererBackend() = 0; virtual mbgl::Size getSize() const = 0; virtual void setSize(mbgl::Size) = 0; |