diff --git a/MobileGL/MG_Impl/GLImpl/VertexArray/GL_VertexArray.cpp b/MobileGL/MG_Impl/GLImpl/VertexArray/GL_VertexArray.cpp index 3ea3add9..fc0bad81 100644 --- a/MobileGL/MG_Impl/GLImpl/VertexArray/GL_VertexArray.cpp +++ b/MobileGL/MG_Impl/GLImpl/VertexArray/GL_VertexArray.cpp @@ -107,7 +107,7 @@ namespace MobileGL { return; } - if (!VertexArrayImpl::ValidateVertexArrayName(array, true)) return; + if (!VertexArrayImpl::ValidateVertexArrayName(array)) return; if (!MG_State::pGLContext->ValidateVertexArrayObject(array)) { MG_State::pGLContext->CreateVertexArrayObject(array); @@ -128,7 +128,7 @@ namespace MobileGL { GLuint vao = arrays[i]; if (vao == 0) continue; - if (!VertexArrayImpl::ValidateVertexArrayName(vao, true)) continue; + if (!VertexArrayImpl::ValidateVertexArrayName(vao)) continue; if (MG_State::pGLContext->GetBoundVertexArray() && MG_State::pGLContext->GetBoundVertexArray() == MG_State::pGLContext->GetVertexArrayObject(vao)) { diff --git a/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.cpp b/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.cpp index 374a923a..1287725b 100644 --- a/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.cpp +++ b/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.cpp @@ -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("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( diff --git a/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.h b/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.h index e6865744..f7bbd0e0 100644 --- a/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.h +++ b/MobileGL/MG_Impl/GLImpl/VertexArray/Validators.h @@ -4,7 +4,7 @@ namespace MobileGL::MG_Impl::GLImpl { namespace VertexArrayImpl { - Bool ValidateVertexArrayName(Uint index, Bool allowZero = false); + Bool ValidateVertexArrayName(Uint index); Bool ValidateVertexArrayObject(Uint index); Bool ValidateVertexAttributeIndex(Uint index); Bool ValidateVertexAttribPointerParams(Uint index, SizeT size, DataType type, Int stride);