Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


glMultiDrawElements with Transformation matrices


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 OzgurEra   Members   -  Reputation: 732

Like
0Likes
Like

Posted 16 August 2014 - 04:14 PM

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 {
    SetOtherStuffs();

    

    SetModelMatrix(...);

    glDrawElements(...);

}

 

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, 17 August 2014 - 07:51 PM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS