create seperate shader

This commit is contained in:
Jonas_sorgenfrei@yahoo.de
2022-04-04 14:34:41 +02:00
parent 8fe4397758
commit 36e0cc9ec3
4 changed files with 154 additions and 55 deletions

View File

@@ -13,9 +13,6 @@ class Shader
{
public:
unsigned int ID;
Shader() {
ID = -1;
}
// constructor generates the shader on the fly
// ------------------------------------------------------------------------
@@ -139,7 +136,7 @@ public:
glUniformMatrix4fv(glGetUniformLocation(ID, name.c_str()), 1, GL_FALSE, &mat[0][0]);
}
protected:
private:
// utility function for checking shader compilation/linking errors.
// ------------------------------------------------------------------------
void checkCompileErrors(GLuint shader, std::string type)