Handbook
Glossary
[bind-vertex-attribute] ( stride offset vertex-attribute -- stride offset' quot )
Vocabulary
gpu
.
shaders
.
private
Inputs
stride
an
object
offset
an
object
vertex-attribute
an
object
Outputs
stride
an
object
offset'
an
object
quot
an
object
Definition
USING:
accessors
alien.c-types
combinators
images
kernel
math
quotations
;
IN:
gpu.shaders.private
::
[bind-vertex-attribute]
( stride offset vertex-attribute -- stride offset' quot )
vertex-attribute
name>>
hyphens>underscores
:>
name
vertex-attribute
component-type>>
:>
type type
gl-vertex-type
:>
gl-type vertex-attribute
dim>>
:>
dim
vertex-attribute
normalize?>>
>c-bool
:>
normalize?
vertex-attribute
vertex-attribute-size
:>
size stride offset
size
+
{
{
[
name
not
]
[
[
2drop
]
]
}
{
[
type
unnormalized-integer-components?
]
[
{
name
dim
gl-type
stride
offset
(bind-int-vertex-attribute)
}
>quotation
]
}
[
{
name
dim
gl-type
normalize?
stride
offset
(bind-float-vertex-attribute)
}
>quotation
]
}
cond
;