forked from maplibre/maplibre-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglfw_gl_backend.hpp
38 lines (28 loc) · 994 Bytes
/
glfw_gl_backend.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include "glfw_backend.hpp"
#include <mbgl/gfx/renderable.hpp>
#include <mbgl/gl/renderer_backend.hpp>
struct GLFWwindow;
class GLFWGLBackend final : public GLFWBackend, public mbgl::gl::RendererBackend, public mbgl::gfx::Renderable {
public:
GLFWGLBackend(GLFWwindow*, bool capFrameRate);
~GLFWGLBackend() override;
void swap();
// 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:
void activate() override;
void deactivate() override;
// mbgl::gl::RendererBackend implementation
protected:
mbgl::gl::ProcAddress getExtensionFunctionPointer(const char*) override;
void updateAssumedState() override;
private:
GLFWwindow* window;
};