mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 21:11:50 +00:00
minor refactor
This commit is contained in:
parent
43f9516870
commit
97479d5201
3 changed files with 97 additions and 95 deletions
|
|
@ -8,23 +8,27 @@ class GLSLExtension;
|
|||
|
||||
class Shader {
|
||||
public:
|
||||
static GLSLExtension* preprocessor;
|
||||
unsigned int id;
|
||||
static GLSLExtension* preprocessor;
|
||||
unsigned int id;
|
||||
|
||||
Shader(unsigned int id);
|
||||
~Shader();
|
||||
Shader(unsigned int id);
|
||||
~Shader();
|
||||
|
||||
void use();
|
||||
void uniformMatrix(std::string name, glm::mat4 matrix);
|
||||
void uniform1i(std::string name, int x);
|
||||
void uniform1f(std::string name, float x);
|
||||
void uniform2f(std::string name, float x, float y);
|
||||
void uniform2f(std::string name, glm::vec2 xy);
|
||||
void uniform3f(std::string name, float x, float y, float z);
|
||||
void uniform3f(std::string name, glm::vec3 xyz);
|
||||
void use();
|
||||
void uniformMatrix(std::string name, glm::mat4 matrix);
|
||||
void uniform1i(std::string name, int x);
|
||||
void uniform1f(std::string name, float x);
|
||||
void uniform2f(std::string name, float x, float y);
|
||||
void uniform2f(std::string name, glm::vec2 xy);
|
||||
void uniform3f(std::string name, float x, float y, float z);
|
||||
void uniform3f(std::string name, glm::vec3 xyz);
|
||||
|
||||
static Shader* loadShader(std::string vertexFile, std::string fragmentFile,
|
||||
std::string vertexSource, std::string fragmentSource);
|
||||
static Shader* create(
|
||||
std::string vertexFile,
|
||||
std::string fragmentFile,
|
||||
std::string vertexSource,
|
||||
std::string fragmentSource
|
||||
);
|
||||
};
|
||||
|
||||
#endif /* GRAPHICS_SHADER_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue