title: Opengl VAO and uniforms: Handling many models in a rendering loop
body: <p>Assuming I have a class which describes a model in my scene (for example a rectangle).
  This class contains, most importantly the model matrix and the VAO.
  When designing the drawing loop in my rendering code I now do the following (pseudo-code):</p>
  
  <pre><code>functon draw{
    list = getListOfMeshes() /* List containing mesh class items */
    iterate list { /* could be for example 1000 different models */
      set model matrix uniform
      bind VAO 
      draw elements
    }
  }
  </code></pre>
  
  <p>I understand that this could probably be optimized to just one VAO call:</p>
  
  <pre><code>functon draw{
    bind VAO
    draw elements
    /* How to handle the uniforms that are different for each model?? */
  }
  </code></pre>
  
  <p>Once I get many models in my scene this list iteration becomes a bottleneck. Is there an alternative way to design this rendring loop?</p>