[Fix] (MG_Impl/VertexArray|Buffer): Fix incorrect name zero operations.

This commit is contained in:
BZLZHH
2025-08-12 16:54:56 +08:00
parent 5127479874
commit 256e947a5d
6 changed files with 19 additions and 8 deletions
@@ -7,8 +7,10 @@
namespace MobileGL::MG_Impl::GLImpl {
namespace VertexArrayImpl {
Bool ValidateVertexArrayName(Uint index) {
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."));