43 lines
941 B
C++
43 lines
941 B
C++
#pragma once
|
|
|
|
#include "Program.hpp"
|
|
|
|
/// Final pass
|
|
class MainProgram: public Program {
|
|
public:
|
|
struct options {
|
|
bool pbr = true;
|
|
bool triplanar = false;
|
|
//TODO: bool blend = false;
|
|
//TODO: 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);
|
|
|
|
private:
|
|
GLuint MVPMatrixID;
|
|
GLuint ModelMatrixID;
|
|
GLuint ViewMatrixID;
|
|
|
|
GLuint TextureID;
|
|
GLuint NormalID;
|
|
GLuint HOSID;
|
|
|
|
GLuint LightInvDirID;
|
|
};
|