-
Notifications
You must be signed in to change notification settings - Fork 0
/
hge-terrain-unlit-shader.hpp
39 lines (39 loc) · 1.1 KB
/
hge-terrain-unlit-shader.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef HGE_TERRAIN_UNLIT_SHADER_HPP
#define HGE_TERRAIN_UNLIT_SHADER_HPP
#include "hge-configure.hpp"
#include "hge-math.hpp"
#include "hge-shader-unit.hpp"
#include <string>
namespace hge
{
namespace shader
{
class TerrainUnlitShader : public ShaderUnit
{
private:
/// Model View Projection Matrix Uniform Location
GLuint mvpmul;
GLuint shaderProgram;
GLuint vertexShaderProgram;
GLuint fragmentShaderProgram;
/// texture Sampler Location
GLuint tsl;
public:
///\note You must initialize OpenGL before call of this function.
TerrainUnlitShader();
~TerrainUnlitShader();
void setModelMatrix(const math::Matrix4D<> &modelMatrix);
void setModelViewProjectionMatrix(const math::Matrix4D<> &modelViewProjectionMatrix);
void setLODNumber(const GLuint& lodNumber);
void use();
GLuint getModelViewProjectionMatrixUniformLocation();
GLuint getModelMatrixUniformLoaction();
GLuint getVertexShaderProgram();
GLuint getGeometryShaderProgram();
GLuint getFragmentShaderProgram();
GLuint getShaderProgram();
GLuint getTextureSamplerLocation();
};
}
}
#endif