1234567891011121314151617181920212223242526272829303132333435363738 |
- #ifndef WORLDSHADOWMAPPINGSHADER_H
- #define WORLDSHADOWMAPPINGSHADER_H
- #include "ShaderProgram.h"
- class WorldShadowShader
- {
- public:
- WorldShadowShader();
- virtual ~WorldShadowShader();
-
- bool init();
- void resize();
- void preRender(const float* projMatrix);
-
- void bindDepthTexture(unsigned int textureUnit);
-
- void setViewMatrix(const float* data);
- void setModelMatrix(const float* data);
-
- private:
- // shader
- ShaderProgram program;
- // framebuffer
- GLuint framebuffer = 0;
- // textures
- GLuint depthTexture = 0;
- // uniforms locations
- GLint unifProjMatrix = 0;
- GLint unifViewMatrix = 0;
- GLint unifModelMatrix = 0;
- };
- #endif
|