This commit is contained in:
2026-02-02 03:29:04 +08:00
parent 755aadb3c7
commit f200743fc3
4 changed files with 121 additions and 30 deletions

View File

@@ -180,6 +180,10 @@ bool LOpenGLProgram::addShader(std::unique_ptr<LOpenGLShader> shader) {
return true;
}
void LOpenGLProgram::setUniformValue(const std::string &name, glm::vec2 value) const {
glUniform2fv(glGetUniformLocation(programId_, name.c_str()), 1, &value[0]);
}
void LOpenGLProgram::removeShader(GLuint id) {
for (auto ite = shaderList_.begin(); ite != shaderList_.end(); ++ite) {
if ((*ite)->shaderId_ == id) {