Handbook
Glossary
model-uniforms
Vocabulary
model-viewer
Definition
USING:
gpu.textures
gpu.util.wasd
sequences
;
IN:
model-viewer
TUPLE:
model-uniforms
<
mvp-uniforms
{
map_Ka
texture
initial:
T{
texture
}
}
{
map_bump
texture
initial:
T{
texture
}
}
{
Ka
sequence
initial:
f
}
{
light
sequence
initial:
f
}
{
view_pos
sequence
initial:
f
}
;
Methods
USING:
accessors
combinators
gpu.render.private
kernel
model-viewer
;
M:
model-uniforms
(bind-uniform-textures)
nip
{
[
map_Ka>>
0
(bind-texture-unit)
]
[
map_bump>>
1
(bind-texture-unit)
]
}
cleave
;
USING:
accessors
combinators
gpu.render.private
gpu.shaders
gpu.util.wasd
kernel
model-viewer
opengl.gl
;
M:
model-uniforms
(bind-uniforms)
2dup
M\
mvp-uniforms
(bind-uniforms)
{
[
[
"map_Ka"
uniform-index
]
[
map_Ka>>
]
bi*
drop
0
glUniform1i
]
[
[
"map_bump"
uniform-index
]
[
map_bump>>
]
bi*
drop
1
glUniform1i
]
[
[
"Ka"
uniform-index
]
[
Ka>>
]
bi*
bind-uniform-vec3
]
[
[
"light"
uniform-index
]
[
light>>
]
bi*
bind-uniform-vec3
]
[
[
"view_pos"
uniform-index
]
[
view_pos>>
]
bi*
bind-uniform-vec3
]
}
2cleave
;