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
3
#include "
RenderCore/EGraphicsAPI.h
"
4
5
#include "
ThirdParty/GLFW3_fwd.h
"
6
7
#include <Utility/INoCopyAndMove.h>
8
#include <Common/primitive_type.h>
9
#include <Math/TVector2.h>
10
11
#include <variant>
12
13
namespace
ph::editor::ghi
{
class
GraphicsContext
; }
14
15
namespace
ph::editor
16
{
17
22
class
PlatformDisplay
:
private
INoCopyAndMove
23
{
24
friend
class
Platform
;
25
26
protected
:
27
PlatformDisplay
();
28
virtual
~PlatformDisplay
();
29
30
public
:
31
virtual
ghi::GraphicsContext
*
getGraphicsContext
()
const
= 0;
32
virtual
math::Vector2S
getSizePx
()
const
= 0;
33
virtual
math::Vector2S
getFramebufferSizePx
()
const
= 0;
34
virtual
ghi::EGraphicsAPI
getGraphicsApiType
()
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
45
inline
float32
PlatformDisplay::getDpiScale
()
const
46
{
47
return
1.0f;
48
}
49
50
}
// end namespace ph::editor
EGraphicsAPI.h
GLFW3_fwd.h
ph::editor::PlatformDisplay
Platform display abstraction.
Definition
PlatformDisplay.h:23
ph::editor::PlatformDisplay::getGraphicsContext
virtual ghi::GraphicsContext * getGraphicsContext() const =0
ph::editor::PlatformDisplay::getNativeWindow
virtual NativeWindow getNativeWindow() const
Definition
PlatformDisplay.cpp:10
ph::editor::PlatformDisplay::getSizePx
virtual math::Vector2S getSizePx() const =0
ph::editor::PlatformDisplay::getDpiScale
virtual float32 getDpiScale() const
Definition
PlatformDisplay.h:45
ph::editor::PlatformDisplay::getFramebufferSizePx
virtual math::Vector2S getFramebufferSizePx() const =0
ph::editor::PlatformDisplay::NativeWindow
std::variant< std::monostate, GLFWwindow * > NativeWindow
Definition
PlatformDisplay.h:38
ph::editor::PlatformDisplay::~PlatformDisplay
virtual ~PlatformDisplay()
ph::editor::PlatformDisplay::PlatformDisplay
PlatformDisplay()
ph::editor::PlatformDisplay::getGraphicsApiType
virtual ghi::EGraphicsAPI getGraphicsApiType() const =0
ph::editor::Platform
Platform abstraction. An abstraction layer for the underlying hardware the application is running on....
Definition
Platform.h:27
ph::editor::ghi::GraphicsContext
Definition
GraphicsContext.h:24
ph::editor::ghi
Definition
PlatformDisplay.h:13
ph::editor::ghi::EGraphicsAPI
EGraphicsAPI
Definition
EGraphicsAPI.h:7
ph::editor
Definition
ph_editor.h:10
Source
Platform
PlatformDisplay.h
Generated by
1.11.0