[Feat] (MG_State/Program): retrieve/generate layout location from/for program, and retrieve generated ubo size and all the offsets of members

This commit is contained in:
2025-08-13 23:14:22 +08:00
parent b7d5de7ce0
commit df444655e3
8 changed files with 102 additions and 3 deletions
@@ -265,7 +265,7 @@ namespace MobileGL {
std::string src;
for (GLsizei i = 0; i < count; i++) {
src +=
(length[i] <= 0) ? string[i] : std::string(string[i], length[i]);
(length == nullptr || length[i] <= 0) ? string[i] : std::string(string[i], length[i]);
}
shaderObject->SetShaderSource(Move(src));
}
@@ -377,6 +377,7 @@ namespace MobileGL {
GLuint CreateProgram(void) {
return CreateProgram_State();
}
GLuint CreateShader(GLenum type) {
return CreateShader_State(type);
}