Открыть боковую панель
nikitronn
sverchok
Wiki
ShaderLib2D
ShaderLib2D
· Изменения
История страницы
Updated ShaderLib2D (markdown)
создал
Май 20, 2021
по автору
Dealga McArdle
Скрыть пробелы
Построчно
Рядом
ShaderLib2D.md
Просмотреть страницу @
c7c16ee6
...
@@ -16,4 +16,9 @@ canvas.add_data(verts, colors, indices)
...
@@ -16,4 +16,9 @@ canvas.add_data(verts, colors, indices)
geom
=
canvas
.
compile
()
geom
=
canvas
.
compile
()
verts
=
geom
.
verts
verts
=
geom
.
verts
tris
=
geom
.
tris
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
)
```
```
\ No newline at end of file