VenomEngine
Cross-Platform Modern Graphics Engine
Loading...
Searching...
No Matches
GraphicsPlugin.h
Go to the documentation of this file.
1
8#pragma once
11
12namespace venom
13{
14namespace common
15{
16
17class GraphicsApplication;
18
19class MaterialImpl;
20class ModelImpl;
21class MeshImpl;
22class TextureImpl;
23class CameraImpl;
24class ShaderPipelineImpl;
25class RenderingPipelineImpl;
26class SkyboxImpl;
27
28class ShaderResourceTable;
29class GUI;
30
31class VENOM_COMMON_API GraphicsPlugin : public Plugin
32{
33public:
34 enum class GraphicsPluginType
35 {
36 Vulkan,
37 Metal,
38 DirectX12
39 };
40
41public:
43 ~GraphicsPlugin() override;
44
45 static GraphicsPlugin * Get();
46
47 virtual GraphicsApplication * CreateGraphicsApplication() = 0;
48
49 // Graphics objects
50 virtual MaterialImpl * CreateMaterial() = 0;
51 virtual ModelImpl * CreateModel() = 0;
52 virtual MeshImpl * CreateMesh() = 0;
53 virtual TextureImpl * CreateTexture() = 0;
54 virtual CameraImpl * CreateCamera() = 0;
55 virtual ShaderPipelineImpl * CreateShaderPipeline() = 0;
56 virtual RenderingPipelineImpl * CreateRenderingPipeline() = 0;
57 virtual SkyboxImpl * CreateSkybox() = 0;
58
59 // Global instances
60 virtual ShaderResourceTable * CreateShaderResourceTable() = 0;
61 virtual GUI * CreateGUI() = 0;
62
63private:
64 friend class GraphicsCachedResource;
65 friend class GraphicsPluginObject;
66 static inline std::unordered_map<std::string, std::shared_ptr<GraphicsCachedResource>> * __GetGraphicsResourceCache() { return Get()->__graphicsResourceCache.get(); }
67 std::unique_ptr<std::unordered_map<std::string, std::shared_ptr<GraphicsCachedResource>>> __graphicsResourceCache;
68};
69
70}
71}
Definition Camera.h:22
Definition GUI.h:22
Definition GraphicsApplication.h:27
Base class for cached resources.
Definition GraphicsPluginObject.h:29
Definition GraphicsPlugin.h:32
Base class for graphics plugin objects.
Definition GraphicsPluginObject.h:80
Definition Material.h:22
Definition Mesh.h:23
Definition Model.h:30
Definition Plugin.h:22
Definition RenderingPipeline.h:18
Definition ShaderPipeline.h:45
Definition ShaderResourceTable.h:29
Definition Skybox.h:18
Definition Texture.h:38
Contains the entirety of the code of the VenomEngine project.
Definition Config.h:13