CSEngine
Loading...
Searching...
No Matches
SEnvironmentMgr.h
1//
2// Created by ounols on 19. 5. 4.
3//
4#pragma once
5
6#include "STexture.h"
7
8namespace CSE {
9
10 class GLProgramHandle;
11
13 public:
15
17
18 void RenderPBREnvironment();
19
20 void BindPBREnvironmentMap(const GLProgramHandle* handle, int textureLayout) const;
21
22 static unsigned int GetWidth();
23 static unsigned int* GetPointerWidth();
24
25 static void SetWidth(unsigned int width);
26
27 static unsigned int GetHeight();
28 static unsigned int* GetPointerHeight();
29
30 static void SetHeight(unsigned int height);
31
32 static void RenderPlaneVAO();
33 static void RenderCubeVAO();
34
35
36 private:
37 void LoadCubeVAO();
38
39 void LoadPlaneVAO();
40
41
42 private:
43 static unsigned int m_width;
44 static unsigned int m_height;
45
46 GLProgramHandle* m_equirectangularToCubemapShader;
47 GLProgramHandle* m_irradianceShader;
48 GLProgramHandle* m_prefilterShader;
49 GLProgramHandle* m_brdfShader;
50
51 STexture* m_hdrTexture;
52 STexture* m_envCubemap;
53 STexture* m_irradianceMap;
54 STexture* m_prefilterMap;
55 STexture* m_brdfMap;
56
57 unsigned int m_cubeVBO;
58 static unsigned int m_cubeVAO;
59 unsigned int m_planeVBO;
60 static unsigned int m_planeVAO;
61 };
62}