-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphicsEngine.h
More file actions
50 lines (39 loc) · 1.18 KB
/
GraphicsEngine.h
File metadata and controls
50 lines (39 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#pragma once
#include "Prerequisites.h"
#include "RenderSystem.h"
#include "TextureManager.h"
#include "MeshManager.h"
#include "Material.h"
class GraphicsEngine
{
// Graphics engine class will be a singleton
private:
// Init the Graphics Engine and DirectX 11 Device
GraphicsEngine();
// Release all the resources loaded
~GraphicsEngine();
public:
RenderSystem* getRenderSystem();
TextureManager* getTextureManager();
MeshManager* getMeshManager();
public:
// The get method that gives the only instance of GraphicsEngine
static GraphicsEngine* get();
static void create();
static void release();
public:
MaterialPtr createMaterial(const wchar_t* vertex_shader_path, const wchar_t* pixel_shader_path);
MaterialPtr createMaterial(const MaterialPtr& material);
void setMaterial(const MaterialPtr& material);
void getVertexMeshLayoutShaderByteCodeAndSize(void** byte_code, size_t* size);
private:
RenderSystem* mRenderSystem = nullptr;
TextureManager* mTexManager = nullptr;
MeshManager* mMeshManager = nullptr;
private:
unsigned char mMeshLayoutByteCode[1024];
size_t mMeshLayoutSize = 0;
private:
// The only instance of the graphics engine
static GraphicsEngine* mEngine;
};