Handbook
Glossary
bunny-uniforms
Vocabulary
gpu
.
demos
.
bunny
Definition
USING:
gpu.util.wasd
math
sequences
;
IN:
gpu.demos.bunny
TUPLE:
bunny-uniforms
<
mvp-uniforms
{
light-position
sequence
initial:
f
}
{
color
sequence
initial:
f
}
{
ambient
sequence
initial:
f
}
{
diffuse
sequence
initial:
f
}
{
shininess
float
initial:
0.0
}
;
Methods
USING:
combinators
gpu.demos.bunny
gpu.render.private
kernel
;
M:
bunny-uniforms
(bind-uniform-textures)
nip
{
}
cleave
;
USING:
accessors
combinators
gpu.demos.bunny
gpu.render.private
gpu.shaders
gpu.util.wasd
kernel
opengl.gl
;
M:
bunny-uniforms
(bind-uniforms)
2dup
M\
mvp-uniforms
(bind-uniforms)
{
[
[
"light_position"
uniform-index
]
[
light-position>>
]
bi*
bind-uniform-vec3
]
[
[
"color"
uniform-index
]
[
color>>
]
bi*
bind-uniform-vec4
]
[
[
"ambient"
uniform-index
]
[
ambient>>
]
bi*
bind-uniform-vec4
]
[
[
"diffuse"
uniform-index
]
[
diffuse>>
]
bi*
bind-uniform-vec4
]
[
[
"shininess"
uniform-index
]
[
shininess>>
]
bi*
glUniform1f
]
}
2cleave
;