[Feat] (MG_State/VertexArrayState): Implement VertexArrayState.

This commit is contained in:
BZLZHH
2025-07-25 16:52:38 +08:00
parent fc9018f97c
commit 4154d3f4ee
8 changed files with 256 additions and 0 deletions
+32
View File
@@ -65,6 +65,38 @@ namespace MobileGL {
return m_bufferState.ValidateBufferObject(index);
}
// VertexArray
Vector<Uint> GLContext::GenVertexArrayNames(Uint number) {
return m_vertexArrayState.GenerateNames(number);
}
SharedPtr<VertexArrayObject> GLContext::GetVertexArrayObject(Uint index) {
return m_vertexArrayState.GetVertexArrayObject(index);
}
void GLContext::BindVertexArray(Uint index) {
m_vertexArrayState.Bind(index);
}
SharedPtr<VertexArrayObject> GLContext::CreateVertexArrayObject(Uint index) {
return m_vertexArrayState.CreateVertexArrayObject(index);
}
void GLContext::MarkVertexArrayForDeletion(Uint index) {
m_vertexArrayState.MarkVertexArrayForDeletion(index);
}
bool GLContext::ValidateVertexArrayName(Uint index) const {
return m_vertexArrayState.ValidateName(index);
}
bool GLContext::ValidateVertexArrayObject(Uint index) const {
return m_vertexArrayState.ValidateVertexArrayObject(index);
}
SharedPtr<VertexArrayObject> GLContext::GetBoundVertexArray() {
return m_vertexArrayState.GetBoundVertexArray();
}
}
GLState::GLContext* pGLContext;