• Advertisement
Sign in to follow this  

glMultiDrawElements with Transformation matrices

This topic is 1252 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello guys,
I have a problem with using glMultiDrawElements;

In a typical drawing, I would do something like this: (Pseudo-code)


foreach obj in objects {






As you can see, I can set Model Matrices of every model.
But with glMultiDrawElements, How can I achive something like this? How can I give a different matrix for every object?
Is there a shader counter for draw calls? (So I can grab their matrices from something like a uniform.)

If yes. How will this counter increased if some of the calls are instanced when I use glMultiDrawElementsIndirect()?

Edited by OzgurEra

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement