Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bart Louwers <bart.louwers@gmail.com>
36 lines
935 B
C++
36 lines
935 B
C++
#pragma once
|
|
|
|
#include "glfw_backend.hpp"
|
|
|
|
#include <mbgl/gfx/renderable.hpp>
|
|
#include <mbgl/vulkan/renderer_backend.hpp>
|
|
|
|
struct GLFWwindow;
|
|
|
|
class GLFWVulkanBackend final : public GLFWBackend, public mbgl::vulkan::RendererBackend, public mbgl::gfx::Renderable {
|
|
public:
|
|
GLFWVulkanBackend(GLFWwindow*, bool capFrameRate);
|
|
~GLFWVulkanBackend() override;
|
|
|
|
GLFWwindow* getWindow() { return window; }
|
|
|
|
// GLFWRendererBackend implementation
|
|
public:
|
|
mbgl::gfx::RendererBackend& getRendererBackend() override { return *this; }
|
|
mbgl::Size getSize() const override;
|
|
void setSize(mbgl::Size) override;
|
|
|
|
// mbgl::gfx::RendererBackend implementation
|
|
public:
|
|
mbgl::gfx::Renderable& getDefaultRenderable() override { return *this; }
|
|
|
|
protected:
|
|
std::vector<const char*> getInstanceExtensions() override;
|
|
|
|
void activate() override {}
|
|
void deactivate() override {}
|
|
|
|
private:
|
|
GLFWwindow* window;
|
|
};
|