[Feat] (MG_Impl/VertexArray): implement client-side buffer

This commit is contained in:
2026-06-07 13:02:58 +08:00
parent fbaf5261e2
commit ad1ca4ea92
5 changed files with 118 additions and 12 deletions
@@ -60,12 +60,6 @@ namespace MobileGL::MG_Impl::GLImpl {
auto& vboSlot = MG_State::pGLContext->GetBufferBindingSlot(BufferTarget::Vertex);
auto& vbo = vboSlot.GetBoundObject();
if (!vbo) {
MG_State::pGLContext->RecordError(
ErrorCode::InvalidOperation, MakeUnique<GenericErrorInfo>("MG_Impl/GLImpl", "VertexAttribPointer_State",
"No buffer is bound to GL_ARRAY_BUFFER."));
return;
}
auto offset = reinterpret_cast<SizeT>(pointer);
@@ -91,12 +85,6 @@ namespace MobileGL::MG_Impl::GLImpl {
auto& vboSlot = MG_State::pGLContext->GetBufferBindingSlot(BufferTarget::Vertex);
auto& vbo = vboSlot.GetBoundObject();
if (!vbo) {
MG_State::pGLContext->RecordError(
ErrorCode::InvalidOperation, MakeUnique<GenericErrorInfo>("MG_Impl/GLImpl", "VertexAttribPointer_State",
"No buffer is bound to GL_ARRAY_BUFFER."));
return;
}
SizeT offset = reinterpret_cast<SizeT>(pointer);