Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
GlfwPlatform.h
Go to the documentation of this file.
1#pragma once
2
3#include "Platform/Platform.h"
6
8
9#include <memory>
10
11namespace ph::editor
12{
13
14class AppSettings;
15class Editor;
16
17class GlfwPlatform : public Platform
18{
19public:
20 GlfwPlatform(const AppSettings& settings, Editor& editor);
21 ~GlfwPlatform() override;
22
23 void update(float64 deltaS) override;
24 const PlatformInput& getInput() const override;
25 const PlatformDisplay& getDisplay() const override;
26
27 bool isGlfwWindowInitialized() const;
28
29private:
30 void initialize(const AppSettings& settings);
31 void terminate();
32
33 GlfwInput m_input;
34 GlfwDisplay m_display;
35};
36
38{
39 return m_input;
40}
41
43{
44 return m_display;
45}
46
48{
49 return m_display.getGlfwWindow() != nullptr;
50}
51
52}// end namespace ph::editor
Definition AppSettings.h:17
Definition Editor.h:45
Definition GlfwDisplay.h:17
GLFWwindow * getGlfwWindow() const
Definition GlfwDisplay.h:52
Definition GlfwInput.h:15
Definition GlfwPlatform.h:18
bool isGlfwWindowInitialized() const
Definition GlfwPlatform.h:47
const PlatformInput & getInput() const override
Definition GlfwPlatform.h:37
GlfwPlatform(const AppSettings &settings, Editor &editor)
Definition GlfwPlatform.cpp:26
const PlatformDisplay & getDisplay() const override
Definition GlfwPlatform.h:42
~GlfwPlatform() override
Definition GlfwPlatform.cpp:34
void update(float64 deltaS) override
Definition GlfwPlatform.cpp:39
Platform display abstraction.
Definition PlatformDisplay.h:23
Platform abstraction. An abstraction layer for the underlying hardware the application is running on....
Definition Platform.h:27
Platform input abstraction.
Definition PlatformInput.h:18
Definition ph_editor.h:10