2
$\begingroup$

I have 3 objects in my scene, each one is being passed to the buffer and drawn as part of a different Vertex Array Object, so for the 3 objects i have: vao1, vao2, vao3.

Object1 is drawn using glDrawElementsInstanced.

Object2 is drawn using glDrawElementsInstanced.

Object3 is drawn using glDrawArraysInstanced.

All of those instances of all of those objects create one big object. So how can i take that big object (meaning - treat all 3 object as one) and draw it 5 times using instancing?

Thanks!

$\endgroup$
  • $\begingroup$ at some point you have no choice but to call glDraw* multiple times with different uniforms. $\endgroup$ – ratchet freak Mar 1 '17 at 15:07
  • $\begingroup$ I don't think that you can treat these 3 objects as one because they belong to different vaos. You can't bind more than one vao at the time. $\endgroup$ – narthex Mar 1 '17 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.