... | ... | @@ -16,4 +16,9 @@ canvas.add_data(verts, colors, indices) |
|
|
geom = canvas.compile()
|
|
|
verts = geom.verts
|
|
|
tris = geom.tris
|
|
|
indices = geom.indices
|
|
|
|
|
|
# then you can pass all shapes in one go to the batch draw.
|
|
|
batch = batch_for_shader(shader, 'TRIS', {"pos": geom.vectors, "color": geom.vertex_colors}, indices=geom.indices)
|
|
|
batch.draw(shader)
|
|
|
``` |
|
|
\ Нет новой строки в конце файла |