Handbook
Glossary
make-colored-vertices ( points color -- float-array )
Vocabulary
ui
.
render
Inputs
points
an
object
color
an
object
Outputs
float-array
an
object
Definition
USING:
colors
math
sequences
specialized-arrays.instances.alien.c-types.float
;
IN:
ui.render
::
make-colored-vertices
( points color -- float-array )
color
>rgba-components
:>
( r g b a ) points
length
6
*
<float-array>
:>
arr points
[|
pt i |
pt
first
i 6
*
0
+
arr
set-nth
pt
second
i 6
*
1
+
arr
set-nth
r i 6
*
2
+
arr
set-nth
g i 6
*
3
+
arr
set-nth
b i 6
*
4
+
arr
set-nth
a i 6
*
5
+
arr
set-nth
]
each-index
arr
;