Wrote constructor
This commit is contained in:
@@ -16,4 +16,6 @@ public:
|
||||
|
||||
void load(std::string filePath, GLenum type);
|
||||
void link();
|
||||
};
|
||||
Shader(std::string& name, std::string filePath, GLenum type);
|
||||
Shader() = default;
|
||||
};
|
||||
|
@@ -76,4 +76,9 @@ void Shader::link() {
|
||||
|
||||
glLinkProgram(id);
|
||||
linkingError(id);
|
||||
}
|
||||
}
|
||||
|
||||
Shader::Shader(std::string& name, std::string filePath, GLenum type) {
|
||||
this->name = name;
|
||||
load(filePath, type);
|
||||
}
|
||||
|
Reference in New Issue
Block a user