mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Chore] (MG_State/VertexArrayState): add const getter to index buffer binding slot
This commit is contained in:
@@ -85,6 +85,11 @@ namespace MobileGL::MG_State::GLState {
|
|||||||
return m_indexBufferBindingSlot;
|
return m_indexBufferBindingSlot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const BindingSlot<BufferObject>& VertexArrayObject::GetIndexBufferBindingSlot() const {
|
||||||
|
return m_indexBufferBindingSlot;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const VertexAttribute& VertexArrayObject::GetAttribute(Uint index) const {
|
const VertexAttribute& VertexArrayObject::GetAttribute(Uint index) const {
|
||||||
static VertexAttribute emptyAttr;
|
static VertexAttribute emptyAttr;
|
||||||
if (index >= MAX_VERTEX_ATTRIBS) return emptyAttr;
|
if (index >= MAX_VERTEX_ATTRIBS) return emptyAttr;
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ namespace MobileGL {
|
|||||||
void BindAttributeBuffer(Uint index, const SharedPtr<BufferObject>& buffer);
|
void BindAttributeBuffer(Uint index, const SharedPtr<BufferObject>& buffer);
|
||||||
|
|
||||||
BindingSlot<BufferObject>& GetIndexBufferBindingSlot();
|
BindingSlot<BufferObject>& GetIndexBufferBindingSlot();
|
||||||
|
const BindingSlot<BufferObject>& GetIndexBufferBindingSlot() const;
|
||||||
|
|
||||||
const VertexAttribute& GetAttribute(Uint index) const;
|
const VertexAttribute& GetAttribute(Uint index) const;
|
||||||
const Array<VertexAttribute, MAX_VERTEX_ATTRIBS>& GetAllAttributes() const;
|
const Array<VertexAttribute, MAX_VERTEX_ATTRIBS>& GetAllAttributes() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user