Some groundwork for cubemaps.

This commit is contained in:
Tleety
2016-02-23 16:00:43 +01:00
parent 4ffb03fdd5
commit 91b0ac5fbd
13 changed files with 126 additions and 14 deletions
+26
View File
@@ -0,0 +1,26 @@
#ifndef CubeMapPass_h__
#define CubeMapPass_h__
#include "IRenderer.h"
#include "ShaderProgram.h"
class CubeMapPass
{
public:
CubeMapPass(IRenderer* renderer);
~CubeMapPass() { }
void LoadTextures();
void FillCubeMap(glm::vec3 originPosition);
void GenerateCubeMapTexture();
//GLuint CubeMapTexture() const { return m_CubeMapTexture; }
GLuint m_CubeMapTexture;
private:
IRenderer* m_Renderer;
std::vector<Texture*> m_CubeMapTestTextures;
};
#endif
+4 -1
View File
@@ -4,6 +4,7 @@
#include "IRenderer.h"
#include "DrawFinalPassState.h"
#include "LightCullingPass.h"
#include "CubeMapPass.h"
#include "FrameBuffer.h"
#include "ShaderProgram.h"
#include "Util/UnorderedMapVec2.h"
@@ -13,7 +14,7 @@
class DrawFinalPass
{
public:
DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass);
DrawFinalPass(IRenderer* renderer, LightCullingPass* lightCullingPass, CubeMapPass* cubeMapPass);
~DrawFinalPass() { }
void InitializeTextures();
void InitializeFrameBuffers();
@@ -62,12 +63,14 @@ private:
GLuint m_SceneTextureLowRes;
GLuint m_DepthBuffer;
GLuint m_DepthBufferLowRes;
GLuint m_CubeMapTexture;
//maqke this component based i guess?
GLuint m_ShieldPixelRate = 16;
const IRenderer* m_Renderer;
const LightCullingPass* m_LightCullingPass;
const CubeMapPass* m_CubeMapPass;
ShaderProgram* m_ForwardPlusProgram;
ShaderProgram* m_ExplosionEffectProgram;
+2
View File
@@ -17,6 +17,7 @@
#include "DrawBloomPass.h"
#include "DrawColorCorrectionPass.h"
#include "SSAOPass.h"
#include "CubeMapPass.h"
#include "../Core/EventBroker.h"
#include "ImGuiRenderPass.h"
#include "Camera.h"
@@ -74,6 +75,7 @@ private:
DrawBloomPass* m_DrawBloomPass;
DrawColorCorrectionPass* m_DrawColorCorrectionPass;
SSAOPass* m_SSAOPass;
CubeMapPass* m_CubeMapPass;
//----------------------Functions----------------------//
void InitializeWindow();
+1
View File
@@ -18,6 +18,7 @@ public:
void Bind(GLenum textureUnit = GL_TEXTURE0);
GLuint m_Texture = 0;
unsigned char* Data = nullptr;
};