Handbook
Glossary
texture-coords ( texture -- coords )
Vocabulary
opengl
.
textures
.
private
Inputs
texture
an
object
Outputs
coords
an
object
Definition
USING:
accessors
kernel
math.vectors
sequences
specialized-arrays.instances.alien.c-types.float
;
IN:
opengl.textures.private
:
texture-coords
( texture -- coords )
[
[
dim>>
]
[
image>>
dim>>
adjust-texture-dim
]
bi
v/
]
[
image>>
upside-down?>>
{
{
0 1
}
{
1 1
}
{
1 0
}
{
0 0
}
}
{
{
0 0
}
{
1 0
}
{
1 1
}
{
0 1
}
}
?
]
bi
[
v*
]
with
map
float-array{
}
join
;