Refactoring, Adding caching, ...

This commit is contained in:
2021-04-16 22:13:46 +02:00
parent ba347d6064
commit 781625f525
11 changed files with 125 additions and 81 deletions

View File

@@ -210,7 +210,7 @@ void Controller::updateExposure(ShaderProgram *shaderProgram)
shaderProgram->unbind();
}
ShaderProgram* Controller::getShaderProgramByName(const char *name)
ShaderProgram* Controller::getShaderProgramByName(const std::string& name)
{
for (auto it = shaderPrograms.begin(); it != shaderPrograms.end(); it++) {
if((*it)->getUniqueName() == name) {
@@ -221,7 +221,7 @@ ShaderProgram* Controller::getShaderProgramByName(const char *name)
return nullptr;
}
ShaderProgram* Controller::getShaderProgramByName(std::vector<ShaderProgram*> shaderPrograms, const char *name)
ShaderProgram* Controller::getShaderProgramByName(std::vector<ShaderProgram*> shaderPrograms, const std::string& name)
{
for (auto it = shaderPrograms.begin(); it != shaderPrograms.end(); it++) {
if((*it)->getUniqueName() == name) {
@@ -237,7 +237,6 @@ void Controller::setMaxFps(uint16_t fps)
MAX_FPS = fps;
}
#ifdef _DEBUG
void Controller::renderImGui(World *world, PointLight *pointLight, glm::vec3 *lightColor, bool *rotateEntity, bool *rotateLightSource, ShaderProgram *postProcessingProgram, float *intensity, bool *drawShadows)
{