Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
NullObjectManager.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace ph::editor::ghi
6{
7
9{
10public:
11 ~NullObjectManager() override = default;
12
14 {
15 return TextureHandle{};
16 }
17
19 const FramebufferDesc& desc) override
20 {
21 return FramebufferHandle{};
22 }
23
25 std::string name,
26 EShadingStage shadingStage,
27 std::string shaderSource) override
28 {
29 return ShaderHandle{};
30 }
31
33 std::string name,
34 const ShaderSetInfo& shaders) override
35 {
36 return ShaderProgramHandle{};
37 }
38
40 std::size_t numVertices,
41 const VertexGroupFormatInfo& format,
42 EStorageUsage usage) override
43 {
44 return VertexStorageHandle{};
45 }
46
48 std::size_t numIndices,
49 EStorageElement indexType,
50 EStorageUsage usage) override
51 {
52 return IndexStorageHandle{};
53 }
54
56 TSpanView<VertexStorageHandle> vertexStorages,
57 const MeshVertexLayoutInfo& layout,
58 IndexStorageHandle indexStorage) override
59 {
60 return MeshHandle{};
61 }
62
64 TextureHandle handle,
65 TSpanView<std::byte> pixelData,
66 EPixelFormat pixelFormat,
67 EPixelComponent pixelComponent) override
68 {}
69
70 void removeTexture(TextureHandle handle) override
71 {}
72
74 {}
75
76 void removeShader(ShaderHandle handle) override
77 {}
78
80 {}
81
83 {}
84
86 {}
87
88 void removeMesh(MeshHandle handle) override
89 {}
90
91 void onGHILoad() override
92 {}
93
94 void onGHIUnload() override
95 {}
96
97 void beginFrameUpdate(const GHIThreadUpdateContext& ctx) override
98 {}
99
100 void endFrameUpdate(const GHIThreadUpdateContext& ctx) override
101 {}
102};
103
104}// end namespace ph::editor::ghi
Definition GHIThreadUpdateContext.h:11
Definition ghi_infos.h:124
Manages the creation and deletion of graphics-related resource objects. All create<XXX>() and delete<...
Definition GraphicsObjectManager.h:26
Definition NullObjectManager.h:9
void removeVertexStorage(VertexStorageHandle handle) override
Definition NullObjectManager.h:82
void removeShaderProgram(ShaderProgramHandle handle) override
Definition NullObjectManager.h:79
TextureHandle createTexture(const TextureDesc &desc) override
Definition NullObjectManager.h:13
void removeShader(ShaderHandle handle) override
Definition NullObjectManager.h:76
void removeTexture(TextureHandle handle) override
Definition NullObjectManager.h:70
void removeFramebuffer(FramebufferHandle handle) override
Definition NullObjectManager.h:73
FramebufferHandle createFramebuffer(const FramebufferDesc &desc) override
Definition NullObjectManager.h:18
VertexStorageHandle createVertexStorage(std::size_t numVertices, const VertexGroupFormatInfo &format, EStorageUsage usage) override
Definition NullObjectManager.h:39
void onGHILoad() override
Called by GHI thread after GHI is loaded.
Definition NullObjectManager.h:91
void onGHIUnload() override
Called by GHI thread before GHI is unloaded.
Definition NullObjectManager.h:94
void beginFrameUpdate(const GHIThreadUpdateContext &ctx) override
Called by GHI thread when a frame begins.
Definition NullObjectManager.h:97
ShaderProgramHandle createShaderProgram(std::string name, const ShaderSetInfo &shaders) override
Definition NullObjectManager.h:32
void removeMesh(MeshHandle handle) override
Definition NullObjectManager.h:88
void endFrameUpdate(const GHIThreadUpdateContext &ctx) override
Called by GHI thread when a frame ends.
Definition NullObjectManager.h:100
MeshHandle createMesh(TSpanView< VertexStorageHandle > vertexStorages, const MeshVertexLayoutInfo &layout, IndexStorageHandle indexStorage) override
Definition NullObjectManager.h:55
void removeIndexStorage(IndexStorageHandle handle) override
Definition NullObjectManager.h:85
~NullObjectManager() override=default
IndexStorageHandle createIndexStorage(std::size_t numIndices, EStorageElement indexType, EStorageUsage usage) override
Definition NullObjectManager.h:47
ShaderHandle createShader(std::string name, EShadingStage shadingStage, std::string shaderSource) override
Definition NullObjectManager.h:24
void uploadPixelData(TextureHandle handle, TSpanView< std::byte > pixelData, EPixelFormat pixelFormat, EPixelComponent pixelComponent) override
Definition NullObjectManager.h:63
Definition ghi_infos.h:46
Definition ghi_infos.h:101
Definition PlatformDisplay.h:13
EPixelFormat
Definition ghi_enums.h:31
EStorageElement
Definition ghi_enums.h:70
EShadingStage
Definition ghi_enums.h:104
EStorageUsage
Definition ghi_enums.h:86
EPixelComponent
Definition ghi_enums.h:42