renderer/opengl: Extract shaders from source (#9600)

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
This commit is contained in:
UjinT34 2025-03-29 03:19:35 +03:00 committed by GitHub
parent a46576afc3
commit 7374a023ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 1533 additions and 1059 deletions

View file

@ -1,17 +1,5 @@
#include "Shader.hpp"
GLint CShader::getUniformLocation(const std::string& unif) {
const auto itpos = m_muUniforms.find(unif);
if (itpos == m_muUniforms.end()) {
const auto unifLoc = glGetUniformLocation(program, unif.c_str());
m_muUniforms[unif] = unifLoc;
return unifLoc;
}
return itpos->second;
}
CShader::~CShader() {
destroy();
}