Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
GlfwDisplay.h
Go to the documentation of this file.
1#pragma once
2
5
7
8#include <string>
9#include <memory>
10
11namespace ph::editor
12{
13
14class Editor;
15
17{
18public:
20 ~GlfwDisplay() override;
21
23 math::Vector2S getSizePx() const override;
24 math::Vector2S getFramebufferSizePx() const override;
25 NativeWindow getNativeWindow() const override;
27 float32 getDpiScale() const override;
28
29 void initialize(
30 Editor& editor,
31 const std::string& windowTitle,
32 math::Vector2S sizePx,
33 ghi::EGraphicsAPI graphicsApi,
34 bool useDebugModeGHI);
35
36 void terminate();
37
38 GLFWwindow* getGlfwWindow() const;
39
40private:
41 GLFWwindow* m_glfwWindow;
42 std::unique_ptr<ghi::GraphicsContext> m_graphicsCtx;
43 ghi::EGraphicsAPI m_apiType;
44 math::Vector2S m_sizePx;
45};
46
47inline math::Vector2S GlfwDisplay::getSizePx() const
48{
49 return m_sizePx;
50}
51
52inline GLFWwindow* GlfwDisplay::getGlfwWindow() const
53{
54 return m_glfwWindow;
55}
56
57}// end namespace ph::editor
Definition Editor.h:45
Definition GlfwDisplay.h:17
float32 getDpiScale() const override
Definition GlfwDisplay.cpp:168
ghi::EGraphicsAPI getGraphicsApiType() const override
Definition GlfwDisplay.cpp:162
ghi::GraphicsContext * getGraphicsContext() const override
Definition GlfwDisplay.cpp:156
NativeWindow getNativeWindow() const override
Definition GlfwDisplay.cpp:200
void initialize(Editor &editor, const std::string &windowTitle, math::Vector2S sizePx, ghi::EGraphicsAPI graphicsApi, bool useDebugModeGHI)
Definition GlfwDisplay.cpp:32
math::Vector2S getSizePx() const override
Definition GlfwDisplay.h:47
math::Vector2S getFramebufferSizePx() const override
Definition GlfwDisplay.cpp:185
void terminate()
Definition GlfwDisplay.cpp:135
GLFWwindow * getGlfwWindow() const
Definition GlfwDisplay.h:52
GlfwDisplay()
Definition GlfwDisplay.cpp:22
Platform display abstraction.
Definition PlatformDisplay.h:23
std::variant< std::monostate, GLFWwindow * > NativeWindow
Definition PlatformDisplay.h:38
Definition GraphicsContext.h:24
EGraphicsAPI
Definition EGraphicsAPI.h:7
Definition ph_editor.h:10