           offset = chunk * chunksize * 4
           if these_indices.length == 0
             continue
-          @prog.set_attribute('a_position', 'vec2', [mainGlyph.glglyph.vbo_position, 0, offset * 2])
-          @prog.set_attribute('a_tangents', 'vec4', [mainGlyph.glglyph.vbo_tangents, 0, offset * 4])
-          @prog.set_attribute('a_segment', 'vec2', [mainGlyph.glglyph.vbo_segment, 0, offset * 2])
-          @prog.set_attribute('a_angles', 'vec2', [mainGlyph.glglyph.vbo_angles, 0, offset * 2])
-          @prog.set_attribute('a_texcoord', 'vec2', [mainGlyph.glglyph.vbo_texcoord, 0, offset * 2])
+          @prog.set_attribute('a_position', 'vec2', [mainGlGlyph.vbo_position, 0, offset * 2])
+          @prog.set_attribute('a_tangents', 'vec4', [mainGlGlyph.vbo_tangents, 0, offset * 4])
+          @prog.set_attribute('a_segment', 'vec2', [mainGlGlyph.vbo_segment, 0, offset * 2])
+          @prog.set_attribute('a_angles', 'vec2', [mainGlGlyph.vbo_angles, 0, offset * 2])
+          @prog.set_attribute('a_texcoord', 'vec2', [mainGlGlyph.vbo_texcoord, 0, offset * 2])
           # The actual drawing
           @index_buffer.set_size(these_indices.length*2)
           @index_buffer.set_data(0, these_indices)


      # Select buffers from main glyph
      # (which may be this glyph but maybe not if this is a (non)selection glyph)
      @prog.set_attribute('a_position', 'vec2', [mainGlyph.glglyph.vbo_position, 0, 0])
      @prog.set_attribute('a_tangents', 'vec4', [mainGlyph.glglyph.vbo_tangents, 0, 0])
      @prog.set_attribute('a_segment', 'vec2', [mainGlyph.glglyph.vbo_segment, 0, 0])
      @prog.set_attribute('a_angles', 'vec2', [mainGlyph.glglyph.vbo_angles, 0, 0])
      @prog.set_attribute('a_texcoord', 'vec2', [mainGlyph.glglyph.vbo_texcoord, 0, 0])
      #
      @prog.set_uniform('u_length', 'float', [mainGlyph.glglyph.cumsum])
      @prog.set_texture('u_dash_atlas', @dash_atlas.tex)

      # Handle transformation to device coordinates
      baked_offset = mainGlyph.glglyph._baked_offset
      @prog.set_uniform('u_canvas_size', 'vec2', [trans.width, trans.height])
      @prog.set_uniform('u_offset', 'vec2', [trans.dx - baked_offset[0], trans.dy - baked_offset[1]])
      @prog.set_uniform('u_scale_aspect', 'vec2', [sx, sy])

  draw: (indices, mainGlyph, trans) ->

    # The main glyph has the data, *this* glyph has the visuals.
    mainGlGlyph = mainGlyph.glglyph
    nvertices = mainGlGlyph.nvertices
   
    # Upload data if we must. Only happens for main glyph.
    if mainGlGlyph.data_changed
      mainGlGlyph._baked_offset = [trans.dx, trans.dy]  # float32 precision workaround; used in _set_data() and below
      mainGlGlyph._set_data(nvertices)
      mainGlGlyph.data_changed = false
    else if @glyph.radius? and (trans.sx != @last_trans.sx or trans.sy != @last_trans.sy)
      # Keep screen radius up-to-date for circle glyph. Only happens when a radius is given
      @last_trans = trans
