-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathglfw3windowbackend.hpp
More file actions
35 lines (30 loc) · 1.01 KB
/
glfw3windowbackend.hpp
File metadata and controls
35 lines (30 loc) · 1.01 KB
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
#pragma once
#include <fea/config.hpp>
#include <fea/ui/windowbackend.hpp>
namespace fea{
class GLFW3WindowBackend : public WindowBackend
{
private:
GLFWwindow *window;
GLFWimage *images[2];
public:
void open(VideoMode mode, const std::string& title, uint32_t style, const ContextSettings& settings) override;
void close();
bool isOpen() const;
const ContextSettings getSettings() const override; //not supported
Vec2I getPosition() const;
void setPosition(int32_t x, int32_t y);
Vec2I getSize() const;
void setSize(int32_t w, int32_t h);
void setTitle(const std::string& title);
void setIcon(uint32_t width, uint32_t height, const uint8_t* pixels);
void setVisible(bool visible);
void setVSyncEnabled(bool enabled);
void setMouseCursorVisible(bool visible);
void setFramerateLimit(uint32_t limit);
bool setRenderingActive(bool active) const override;
void swapBuffers();
void lockCursor(bool lock);
~GLFW3WindowBackend();
};
}