Skip to content

Commit 717b9ba

Browse files
committed
Clarify vertex attribute cache ownership
1 parent dc3a7d1 commit 717b9ba

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

indra/llrender/llvertexbuffer.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,10 @@ U32 LLVertexBuffer::sGLRenderIndices = 0;
682682
U32 LLVertexBuffer::sLastMask = 0;
683683
U32 LLVertexBuffer::sVertexCount = 0;
684684

685-
// Attribute pointer state belongs to the currently bound array buffer. Keep
686-
// enough state to avoid resubmitting identical formats to OpenGL-on-Metal.
685+
// The viewer keeps a single VAO bound. Attribute pointer calls store state in
686+
// that VAO and capture the current array buffer. Track the formats configured
687+
// for sGLRenderBuffer to avoid resubmitting identical state to OpenGL-on-Metal.
688+
// If VAO switching is introduced, invalidate this cache when the VAO changes.
687689
static U32 sVertexAttribsConfigured = 0;
688690
static U32 sColorPointerSource = 0;
689691
static constexpr U32 COLOR_POINTER_COLOR = 1;
@@ -1948,4 +1950,3 @@ void LLVertexBuffer::setIndexData(const U32* data, U32 offset, U32 count)
19481950
}
19491951

19501952

1951-

0 commit comments

Comments
 (0)