1
0
Fork 0
Univerxel/src/render/pass/MainProgram.hpp

46 lines
1.0 KiB
C++

#pragma once
#include "Program.hpp"
/// Final pass
class MainProgram: public Program {
public:
struct options {
bool pbr = true;
bool triplanar = false;
bool blend = true;
bool fog = true;
};
MainProgram(const options &opts);
~MainProgram();
std::string getName() const override;
void start(Renderer *) override;
Buffer::params setup(Renderer *, glm::mat4 modelMatrix) override;
void setMVP(const GLfloat *matrix);
void setModel(const GLfloat *matrix);
void setView(const GLfloat *matrix);
void bindTexture(const GLuint textureID);
void bindNormal(const GLuint textureID);
void bindHOS(const GLuint textureID);
void setLightInvDir(const GLfloat *pos);
void setFog(const GLfloat *color, GLfloat depth);
private:
GLuint MVPMatrixID;
GLuint ModelMatrixID;
GLuint ViewMatrixID;
GLuint TextureID;
GLuint NormalID;
GLuint HOSID;
GLuint LightInvDirID;
GLuint FogDepthID;
GLuint FogColorID;
};