Shadows WIP

- create 2D texture (depthmap)
This commit is contained in:
Ayumiwii
2016-02-05 15:08:56 +01:00
parent 2cbeef4c69
commit 7f1016476b
11 changed files with 1812 additions and 4 deletions
+50
View File
@@ -0,0 +1,50 @@
#ifndef ShadowPass_h_
#define ShadowPass_h_
#include "IRenderer.h"
#include "FrameBuffer.h"
#include "ShaderProgram.h"
#include "../Core/EventBroker.h"
#include "../Core/World.h"
#include "ShadowPassState.h"
//#include "ShadowPassState.h" // not created yet
class ShadowPass
{
public:
ShadowPass(IRenderer* renderer);
~ShadowPass();
void InitializeFrameBuffers();
void InitializeShaderPrograms();
void ClearBuffer();
void Draw(RenderScene& scene);
GLuint DepthMap() const { return m_DepthMap; }
private:
EventBroker* m_EventBroker;
const IRenderer* m_Renderer;
GLuint m_DepthMap;
FrameBuffer m_DepthBuffer;
ShaderProgram* m_ShadowProgram;
GLuint m_DepthFBO;
};
#endif