Handbook
Glossary
papier-uniforms
Vocabulary
papier
.
render
Definition
USING:
gpu.render
gpu.textures
sequences
;
IN:
papier.render
TUPLE:
papier-uniforms
<
uniform-tuple
{
p_matrix
sequence
initial:
f
}
{
eye
sequence
initial:
f
}
{
atlas
texture
initial:
T{
texture
}
}
;
Methods
USING:
accessors
combinators
gpu.render.private
kernel
papier.render
;
M:
papier-uniforms
(bind-uniform-textures)
nip
{
[
atlas>>
0
(bind-texture-unit)
]
}
cleave
;
USING:
accessors
combinators
gpu.render
gpu.render.private
gpu.shaders
kernel
opengl.gl
papier.render
;
M:
papier-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"p_matrix"
uniform-index
]
[
p_matrix>>
]
bi*
[
1 0
]
dip
4 4
>uniform-matrix
glUniformMatrix4fv
]
[
[
"eye"
uniform-index
]
[
eye>>
]
bi*
bind-uniform-vec3
]
[
[
"atlas"
uniform-index
]
[
atlas>>
]
bi*
drop
0
glUniform1i
]
}
2cleave
;