# glMultiDrawArraysIndirect issue

**URL:** <https://community.khronos.org/t/glmultidrawarraysindirect-issue/111691>\
**Category:** OpenGL: Advanced Coding\
**Created:** [March 6, 2025, 1:49pm UTC](https://community.khronos.org/t/glmultidrawarraysindirect-issue/111691 "2025-03-06T13:49:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurent7601](https://community.khronos.org/letter_avatar_proxy/v4/letter/l/a5b964/32.png) [@laurent7601](https://community.khronos.org/u/laurent7601)\
**Post date:** [March 6, 2025, 1:49pm UTC](https://community.khronos.org/t/glmultidrawarraysindirect-issue/111691/1 "2025-03-06T13:49:30Z")

</div>

Hi I develop on nvidia and I want to put model’s and material’s data into an SSBO and getting the right material’s data with gl\_DrawID and the right model’s data with gl\_BaseInstance and gl\_InstanceID.  
But I’ve a strange bug when I want to draw the shadows. I have a depthTexture to avoid that shadows has drawn over my 2D tiles models. But when I use glMultiDrawArraysIndirect, the shadows has drawn but the depthTexture si empty so the shadows are drawn over my 2D tiles models.

It works well when I pass model’s data and material’s data into a VBO and when I use glDrawArrays. But the problem is that it consumes a lot of VRAM. (One material info per vertex is overkill)

I posted the issue on the nvidia forum.

---

<div class="post-metadata">

**Author:** ![laurent7601](https://community.khronos.org/letter_avatar_proxy/v4/letter/l/a5b964/32.png) [@laurent7601](https://community.khronos.org/u/laurent7601)\
**Post date:** [March 6, 2025, 9:35pm UTC](https://community.khronos.org/t/glmultidrawarraysindirect-issue/111691/2 "2025-03-06T21:35:53Z")

</div>

Ok I’ve set the old code and then recoding the update and now it’s working, maybe I made a misstake with the first update.
