Wrote constructor

This commit is contained in:
maxbyte9p
2024-04-04 12:23:08 -04:00
parent 6d1fe1b431
commit 19ef2c1f21
2 changed files with 9 additions and 2 deletions

View File

@@ -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;
};

View File

@@ -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);
}