[Improvement] (ProgramState): Remove useless programObj.attribBindings.

This commit is contained in:
BZLZHH
2025-06-08 15:54:10 +08:00
parent 9640e167df
commit 3c98bc5eca
2 changed files with 3 additions and 6 deletions
+2 -4
View File
@@ -119,9 +119,7 @@ GLenum ProgramState::FinalizeProgramPipeline(GLuint program) {
return GL_INVALID_OPERATION; return GL_INVALID_OPERATION;
} }
for (auto& [name, index] : prog.attribBindings) { // TODO: Support explicitly assign attrib locations in the shaders.
prog.attribLocations[name] = index;
}
prog.linked = {UncertainBool::Unknown, UncertainBool::True}; prog.linked = {UncertainBool::Unknown, UncertainBool::True};
prog.linkStatus = GL_TRUE; prog.linkStatus = GL_TRUE;
@@ -159,7 +157,7 @@ GLenum ProgramState::DefineProgramAttributeBinding(GLuint program, GLuint index,
return GL_INVALID_VALUE; 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); MG_Util::Debug::LogD("MG_State: Program: DefineProgramAttributeBinding success: %s -> %u", name, index);
return GL_NO_ERROR; return GL_NO_ERROR;
} }
-1
View File
@@ -42,7 +42,6 @@ struct ProgramObject {
bool dirty; bool dirty;
GLint linkStatus; GLint linkStatus;
std::string infoLog; std::string infoLog;
MG_Global::unordered_map<std::string, GLint> attribBindings;
MG_Global::unordered_map<std::string, GLint> attribLocations; MG_Global::unordered_map<std::string, GLint> attribLocations;
MG_Global::unordered_map<std::string, GLint> uniformLocations; MG_Global::unordered_map<std::string, GLint> uniformLocations;
MG_Global::unordered_map<std::string, UniformValue> uniformValues; MG_Global::unordered_map<std::string, UniformValue> uniformValues;