renderer/opengl: Extract shaders from source (#9600)
--------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
This commit is contained in:
parent
a46576afc3
commit
7374a023ef
35 changed files with 1533 additions and 1059 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue