title: opengl drawing multipe objects from one vao
body: <p>i have a single vao that contains a character set of a font.
  Each character is drawn with a set of indices belonging to it.
  The idea was to write a couple of chars and bind the vao only one time.</p>
  
  <p>Everything works fine - except the positioning of the glyphs.
  The loop is like
  </p>
  
  <pre><code>glGetUniformLocations()
  glBindVertexArray( vao )
  for( i=0; i&lt; lg; i++ )
  {
    glUniforMatrix4fV();      // send translation matrix to shader
    glDrawElements( part of the indexbuffer );
    trans_mx = glm::translate();  // compute the translation matrix
  }
  </code></pre>
  
  <p>Vertexshader is:</p>
  
  <pre><code>#version 450 core
  
  layout( location = 0 ) in vec3 vx;          // the vertex_buffer in modelspace
  layout( location = 1 ) in vec4 vx_col;      // color of each vertex
  
  out vec4 fragment_color;                   
  
  uniform mat4  mvp_mx;         
  uniform mat4  trans_mx;         
  
  void main()
  {
    gl_Position = mvp_mx * vec4( trans_mx * vec4( vx, 1.0f ) );
  
    fragment_color = vx_col;
  }
  </code></pre>
  
  <p>The translation works - but not between the draw calls.
  All chars are drawn at the same position. which is translated.
  For me it seems as if the translation matrix will not be updated.
  ??????</p>
  
  <p>this is the code from the function that draws the chars</p>
  
  <pre><code>  lg  = strlen( str );
    vao = sfs-&gt;vao;
    _sys.mvp_mx   = _sys.proj_mx * _sys.view_mx * vao-&gt;model_mx;   // compute global mvp
  
  
    sh_s = &amp;__sh_list[ vao-&gt;shd_ind ];       // pointer to our shader_struct
    sh_s-&gt;get_uniform_loc();                 // get uniform locations for this shader
    glBindVertexArray( vao-&gt;id );            // bind vao
  
    glUseProgram( sh_s-&gt;prg_id );            // use the shader
  
    for(  c1 = 0; c1 &lt; lg; c1++ )
    {
      sh_s-&gt;send_uniform();                    // send uniforms to the shader
      i_seg = &amp;vao-&gt;ind_b-&gt;seg[ str[ c1 ] ];   // segment for this character
      glDrawElements( i_seg-&gt;prim, i_seg-&gt;count, i_seg-&gt;type, ( void* )i_seg-&gt;offset );
      _sys.trans_mx = glm::translate( glm::mat4( 1.0f ), glm::vec3( 10.0f, 0.0f, 0.0f ) );     
    }
  
    glBindVertexArray( 0 );           // unbind vao
    glUseProgram( 0 );                // unbind shader
  </code></pre>