mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
create seperate shader
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user