[Feat]: implement glBindVertexAttribLocation in DirectGLES backend (fixing OptiFine?)

This commit is contained in:
2025-11-04 22:16:16 +08:00
parent 2f67620a6e
commit 57dd0fe480
6 changed files with 66 additions and 4 deletions
@@ -501,6 +501,9 @@ namespace MobileGL::MG_Backend::DirectGLES {
auto& spirvCode = shaderSpirvs[index];
MG_Util::ShaderTranspiler::SpvcSession spvcSession(spirvCode);
if (glShaderType == GL_VERTEX_SHADER) {
spvcSession.SetVertexAttribLocation(stateProgramObject->GetAttribLocationMap());
}
spvc_compiler_options options;
spvcSession.CreateOptions(&options);