diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-04-02 14:11:37 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-05-28 16:11:05 +0200 |
commit | 7f9274035bad30980e03574c315904ab7a85fe83 (patch) | |
tree | 7b9cd0f2e2883d6da22611eaa68fae07bb7245b6 /platform/glfw/glfw_gl_backend.cpp | |
parent | 33ee7e23de24bd3c076eafef819029cf45451d23 (diff) | |
download | qtlocation-mapboxgl-7f9274035bad30980e03574c315904ab7a85fe83.tar.gz |
[core] refactor program object creation
Diffstat (limited to 'platform/glfw/glfw_gl_backend.cpp')
-rw-r--r-- | platform/glfw/glfw_gl_backend.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/glfw/glfw_gl_backend.cpp b/platform/glfw/glfw_gl_backend.cpp index 4d9d87dd72..d0975fc08f 100644 --- a/platform/glfw/glfw_gl_backend.cpp +++ b/platform/glfw/glfw_gl_backend.cpp @@ -72,3 +72,15 @@ void GLFWGLBackend::setSize(const mbgl::Size newSize) { void GLFWGLBackend::swap() { glfwSwapBuffers(window); } + +namespace mbgl { +namespace gfx { + +template <> +std::unique_ptr<GLFWBackend> +Backend::Create<mbgl::gfx::Backend::Type::OpenGL>(GLFWwindow* window, bool capFrameRate) { + return std::make_unique<GLFWGLBackend>(window, capFrameRate); +} + +} // namespace gfx +} // namespace mbgl |