[Feat] (MG_Impl/VertexArrayState): Allow VAO at index 0.

This commit is contained in:
BZLZHH
2025-10-31 14:40:47 +08:00
parent 731281eb61
commit d36e42103b
3 changed files with 4 additions and 13 deletions
@@ -7,16 +7,7 @@
namespace MobileGL::MG_Impl::GLImpl {
namespace VertexArrayImpl {
Bool ValidateVertexArrayName(Uint index, Bool allowZero) {
if (index == 0) {
if (allowZero) return true;
MG_State::pGLContext->RecordError(
ErrorCode::InvalidValue, MakeShared<GenericErrorInfo>("MG_Impl/GLImpl", "ValidateVertexArrayName",
"Vertex array name 0 is not supported."));
return false;
}
Bool ValidateVertexArrayName(Uint index) {
Bool isValid = MG_State::pGLContext->ValidateVertexArrayName(index);
if (!isValid) {
MG_State::pGLContext->RecordError(