diff --git a/MG/MG_GL/State/Program/ProgramState.cpp b/MG/MG_GL/State/Program/ProgramState.cpp index fed6fb58..2acb3158 100644 --- a/MG/MG_GL/State/Program/ProgramState.cpp +++ b/MG/MG_GL/State/Program/ProgramState.cpp @@ -118,10 +118,8 @@ GLenum ProgramState::FinalizeProgramPipeline(GLuint program) { MG_Util::Debug::LogE("MG_State: Program: FinalizeProgramPipeline error: %s", prog.infoLog.c_str()); return GL_INVALID_OPERATION; } - - for (auto& [name, index] : prog.attribBindings) { - prog.attribLocations[name] = index; - } + + // TODO: Support explicitly assign attrib locations in the shaders. prog.linked = {UncertainBool::Unknown, UncertainBool::True}; prog.linkStatus = GL_TRUE; @@ -159,7 +157,7 @@ GLenum ProgramState::DefineProgramAttributeBinding(GLuint program, GLuint index, return GL_INVALID_VALUE; } - programs_[program].attribBindings[name] = index; + programs_[program].attribLocations[name] = index; MG_Util::Debug::LogD("MG_State: Program: DefineProgramAttributeBinding success: %s -> %u", name, index); return GL_NO_ERROR; } diff --git a/MG/MG_GL/State/Program/ProgramState.h b/MG/MG_GL/State/Program/ProgramState.h index 62eb0371..5e1fd5b9 100644 --- a/MG/MG_GL/State/Program/ProgramState.h +++ b/MG/MG_GL/State/Program/ProgramState.h @@ -42,7 +42,6 @@ struct ProgramObject { bool dirty; GLint linkStatus; std::string infoLog; - MG_Global::unordered_map attribBindings; MG_Global::unordered_map attribLocations; MG_Global::unordered_map uniformLocations; MG_Global::unordered_map uniformValues;