From 09aeee4c0379e3300ed45b10e53439a8d99c9a2e Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Tue, 17 Mar 2026 15:55:16 +0800 Subject: [PATCH] [Chore] (MG_State/VertexArrayState): add const getter to index buffer binding slot --- .../MG_State/GLState/VertexArrayState/VertexArrayObject.cpp | 5 +++++ .../MG_State/GLState/VertexArrayState/VertexArrayObject.h | 1 + 2 files changed, 6 insertions(+) diff --git a/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.cpp b/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.cpp index f5aad6dd..eca3eb92 100644 --- a/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.cpp +++ b/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.cpp @@ -85,6 +85,11 @@ namespace MobileGL::MG_State::GLState { return m_indexBufferBindingSlot; } + const BindingSlot& VertexArrayObject::GetIndexBufferBindingSlot() const { + return m_indexBufferBindingSlot; + } + + const VertexAttribute& VertexArrayObject::GetAttribute(Uint index) const { static VertexAttribute emptyAttr; if (index >= MAX_VERTEX_ATTRIBS) return emptyAttr; diff --git a/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.h b/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.h index 93f6aa47..b8087586 100644 --- a/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.h +++ b/MobileGL/MG_State/GLState/VertexArrayState/VertexArrayObject.h @@ -48,6 +48,7 @@ namespace MobileGL { void BindAttributeBuffer(Uint index, const SharedPtr& buffer); BindingSlot& GetIndexBufferBindingSlot(); + const BindingSlot& GetIndexBufferBindingSlot() const; const VertexAttribute& GetAttribute(Uint index) const; const Array& GetAllAttributes() const;