[Fix] (MG_Backend/DirectGLES): bind GL_DRAW_INDIRECT_BUFFER for native indirect draws

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-08 13:34:31 +00:00
co-authored by Claude Fable 5
parent 638999213e
commit 07055bb531
@@ -266,12 +266,13 @@ namespace MobileGL::MG_Backend::DirectGLES {
} }
} }
// Indirect Buffer Object // Indirect Buffer Object - must also be bound to GL_DRAW_INDIRECT_BUFFER on the ES
// context since indirect draws now execute natively on the GPU.
if (includeIndirectBuffer) { if (includeIndirectBuffer) {
auto& possibleIndirectBuffer = auto& possibleIndirectBuffer =
MG_State::pGLContext->GetBufferBindingSlot(BufferTarget::DrawIndirect).GetBoundObject(); MG_State::pGLContext->GetBufferBindingSlot(BufferTarget::DrawIndirect).GetBoundObject();
if (possibleIndirectBuffer) { if (possibleIndirectBuffer) {
CreateAndSyncBufferObject(possibleIndirectBuffer); SyncBoundBuffer(BufferTarget::DrawIndirect, GL_DRAW_INDIRECT_BUFFER);
} }
} }