Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualmax343

Posted 27 December 2012 - 10:31 AM

So if I have 100 sprites I should send 100 view model matrix with glUniformMatrix4fv and select them with gl_VertexID/4?


I didn't read into it the first time, but the answer is no. A big no. It's much better to use uniform buffers for something this big (or for something that you're going to share). In fact it's better to limit the usage of global uniforms only to those cases in which the overhead of using the buffer is greater.


#1max343

Posted 27 December 2012 - 10:31 AM

<blockquote class="ipsBlockquote" data-author="Retsu90" data-cid="5014699"><p>So if I have 100 sprites I should send 100 view model matrix with glUniformMatrix4fv&nbsp;and select them with gl_VertexID/4?</p></blockquote><br />I didn't read into it the first time, but the answer is no. A big no. It's much better to use uniform buffers for something this big (or for something that you're going to share). In fact it's better to limit the usage of global uniforms only to those cases in which the overhead of using the buffer is greater.

PARTNERS