Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef RENDER_ENGINE_SHADER_H
- #define RENDER_ENGINE_SHADER_H
- #include "CommonInclude.h"
- #include "IO.h"
- #include <sstream>
- #include <map>
- class shader
- {
- private:
- void LoadShader(std::string vertexSource, std::string fragmentSource, std::string vertexPath = "", std::string fragmentPath = "");
- std::map<std::string, GLint> uniformLocation;
- std::map<std::string, GLint> attribLocation;
- public:
- std::string shaderName;
- GLuint programID;
- shader(bool initFromFile, std::string vertex, std::string fragment);
- shader();
- void LoadShaderFromFile(std::string vertexPath, std::string fragmentPath);
- void LoadShaderFromSource(std::string vertexSource, std::string fragmentSource);
- void BindUniformLocation(char* uniformName);
- void BindAttribLocation(char* attribName);
- GLint GetUniformLocation(char* uniformName);
- GLint GetAttribLocation(char* attribName);
- ~shader();
- };
- #endif
Advertisement
Add Comment
Please, Sign In to add comment