12345678910111213141516171819202122232425262728293031323334 |
- #ifndef OVERLAYSHADER_H
- #define OVERLAYSHADER_H
- #include "client/engine/shader/ShaderProgram.h"
- #include "client/math/Matrix3D.h"
- class OverlayShader
- {
- public:
- OverlayShader();
- virtual ~OverlayShader();
-
- bool init();
-
- void preRender();
- void setViewMatrix();
- void setModelMatrix(const float* data);
- void setUseTexture(bool use);
- void setUseColor(bool use);
-
- private:
- // shader
- ShaderProgram program;
- // uniform data
- Matrix3D view;
- // uniforms locations
- GLint unifUseTexture = 0;
- GLint unifUseColor = 0;
- GLint unifViewMatrix = 0;
- GLint unifModelMatrix = 0;
- };
- #endif
|