Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
PlatformDisplay.h
Go to the documentation of this file.
1#pragma once
2
4
6
7#include <Utility/INoCopyAndMove.h>
8#include <Common/primitive_type.h>
9#include <Math/TVector2.h>
10
11#include <variant>
12
13namespace ph::editor::ghi { class GraphicsContext; }
14
15namespace ph::editor
16{
17
22class PlatformDisplay : private INoCopyAndMove
23{
24 friend class Platform;
25
26protected:
29
30public:
32 virtual math::Vector2S getSizePx() const = 0;
33 virtual math::Vector2S getFramebufferSizePx() const = 0;
35
36 virtual float32 getDpiScale() const;
37
38 using NativeWindow = std::variant<
39 std::monostate,
40 GLFWwindow*>;
41
42 virtual NativeWindow getNativeWindow() const;
43};
44
45inline float32 PlatformDisplay::getDpiScale() const
46{
47 return 1.0f;
48}
49
50}// end namespace ph::editor
Platform display abstraction.
Definition PlatformDisplay.h:23
virtual ghi::GraphicsContext * getGraphicsContext() const =0
virtual NativeWindow getNativeWindow() const
Definition PlatformDisplay.cpp:10
virtual math::Vector2S getSizePx() const =0
virtual float32 getDpiScale() const
Definition PlatformDisplay.h:45
virtual math::Vector2S getFramebufferSizePx() const =0
std::variant< std::monostate, GLFWwindow * > NativeWindow
Definition PlatformDisplay.h:38
virtual ghi::EGraphicsAPI getGraphicsApiType() const =0
Platform abstraction. An abstraction layer for the underlying hardware the application is running on....
Definition Platform.h:27
Definition GraphicsContext.h:24
Definition PlatformDisplay.h:13
EGraphicsAPI
Definition EGraphicsAPI.h:7
Definition ph_editor.h:10