Handbook
Glossary
make-texture ( pathname alt -- texture )
Vocabulary
model-viewer
Inputs
pathname
an
object
alt
an
object
Outputs
texture
an
object
Definition
USING:
accessors
gpu.textures
images.loader
kernel
;
IN:
model-viewer
:
make-texture
( pathname alt -- texture )
swap
[
nip
load-image
]
when*
[
[
component-order>>
]
[
component-type>>
]
bi
T{
texture-parameters
{
wrap
repeat-texcoord
}
{
min-filter
filter-linear
}
{
min-mipmap-filter
f
}
}
<texture-2d>
]
[
0
swap
[
allocate-texture-image
]
keepdd
]
bi
;