def create_bars():
    width = win.width / float(BARS)
    for i in range(BARS):
        position = [i * width, 0, # degenerate
                    i * width, 0,
                    (i + 1) * width, 0,
                    (i + 1) * width, 0 # degenerate
                   ]
        color = colors[i % len(colors)] * 4

        bar = batch.add(4, GL_TRIANGLE_STRIP, None, 
            ('v2f/dynamic', position),
            ('c3B/dynamic', color))
        bars.append(bar)
dataset/ETHPy150Open ardekantur/pyglet/experimental/buffer/bars.py/create_bars/original