Handbook
Glossary
(bind-uniforms) ( program-instance uniform-tuple -- )
Vocabulary
gpu
.
render
.
private
Inputs
program-instance
an
object
uniform-tuple
an
object
Outputs
None
Definition
IN:
gpu.render.private
GENERIC:
(bind-uniforms)
( program-instance uniform-tuple -- )
Methods
USING:
accessors
alien.c-types
combinators
gpu.effects.blur
gpu.render
gpu.render.private
gpu.shaders
kernel
opengl.gl
;
M:
blur-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"texture"
uniform-index
]
[
texture>>
]
bi*
drop
0
glUniform1i
]
[
[
"horizontal"
uniform-index
]
[
horizontal>>
]
bi*
>c-bool
glUniform1i
]
[
[
"blurSize"
uniform-index
]
[
blurSize>>
]
bi*
glUniform1f
]
}
2cleave
;
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
;
USING:
accessors
combinators
game.debug.private
gpu.render
gpu.render.private
gpu.shaders
kernel
opengl.gl
;
M:
debug-shapes-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"u_mvp_matrix"
uniform-index
]
[
u_mvp_matrix>>
]
bi*
[
1 0
]
dip
4 4
>uniform-matrix
glUniformMatrix4fv
]
}
2cleave
;
USING:
accessors
combinators
game.debug.private
gpu.render
gpu.render.private
gpu.shaders
kernel
opengl.gl
;
M:
debug-text-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"u_text_map"
uniform-index
]
[
u_text_map>>
]
bi*
drop
0
glUniform1i
]
[
[
"u_background_color"
uniform-index
]
[
u_background_color>>
]
bi*
bind-uniform-vec3
]
}
2cleave
;
USING:
accessors
combinators
gpu.demos.bunny
gpu.render
gpu.render.private
gpu.shaders
kernel
opengl.gl
;
M:
loading-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"texcoord_scale"
uniform-index
]
[
texcoord-scale>>
]
bi*
bind-uniform-vec2
]
[
[
"loading_texture"
uniform-index
]
[
loading-texture>>
]
bi*
drop
0
glUniform1i
]
}
2cleave
;
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
;
USING:
accessors
combinators
gpu.render
gpu.render.private
gpu.shaders
gpu.util.wasd
kernel
opengl.gl
;
M:
mvp-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"mv_matrix"
uniform-index
]
[
mv_matrix>>
]
bi*
[
1 0
]
dip
4 4
>uniform-matrix
glUniformMatrix4fv
]
[
[
"p_matrix"
uniform-index
]
[
p_matrix>>
]
bi*
[
1 0
]
dip
4 4
>uniform-matrix
glUniformMatrix4fv
]
}
2cleave
;
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
;
USING:
accessors
combinators
gpu.demos.raytrace
gpu.render
gpu.render.private
gpu.shaders
kernel
opengl.gl
sequences
;
M:
raytrace-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"mv_inv_matrix"
uniform-index
]
[
mv-inv-matrix>>
]
bi*
[
1 0
]
dip
4 4
>uniform-matrix
glUniformMatrix4fv
]
[
[
"fov"
uniform-index
]
[
fov>>
]
bi*
bind-uniform-vec2
]
[
spheres>>
{
[
0
swap
nth
{
~quotation~ ~quotation~ ~quotation~
}
2cleave
]
[
1
swap
nth
{
~quotation~ ~quotation~ ~quotation~
}
2cleave
]
[
2
swap
nth
{
~quotation~ ~quotation~ ~quotation~
}
2cleave
]
[
3
swap
nth
{
~quotation~ ~quotation~ ~quotation~
}
2cleave
]
}
2cleave
]
[
[
"floor_height"
uniform-index
]
[
floor-height>>
]
bi*
glUniform1f
]
[
[
"floor_color"
uniform-index
]
[
floor-color>>
]
bi*
2
swap
4
>uniform-vec-array
glUniform4fv
]
[
[
"background_color"
uniform-index
]
[
background-color>>
]
bi*
bind-uniform-vec4
]
[
[
"light_direction"
uniform-index
]
[
light-direction>>
]
bi*
bind-uniform-vec3
]
}
2cleave
;
USING:
accessors
combinators
gpu.demos.bunny
gpu.render
gpu.render.private
gpu.shaders
kernel
opengl.gl
;
M:
sobel-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"texcoord_scale"
uniform-index
]
[
texcoord-scale>>
]
bi*
bind-uniform-vec2
]
[
[
"color_texture"
uniform-index
]
[
color-texture>>
]
bi*
drop
0
glUniform1i
]
[
[
"normal_texture"
uniform-index
]
[
normal-texture>>
]
bi*
drop
1
glUniform1i
]
[
[
"depth_texture"
uniform-index
]
[
depth-texture>>
]
bi*
drop
2
glUniform1i
]
[
[
"line_color"
uniform-index
]
[
line-color>>
]
bi*
bind-uniform-vec4
]
}
2cleave
;
USING:
accessors
combinators
gpu.demos.raytrace
gpu.render
gpu.render.private
gpu.shaders
kernel
opengl.gl
;
M:
sphere-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"center"
uniform-index
]
[
center>>
]
bi*
bind-uniform-vec3
]
[
[
"radius"
uniform-index
]
[
radius>>
]
bi*
glUniform1f
]
[
[
"color"
uniform-index
]
[
color>>
]
bi*
bind-uniform-vec4
]
}
2cleave
;
USING:
accessors
combinators
gpu.effects.step
gpu.render
gpu.render.private
gpu.shaders
kernel
opengl.gl
;
M:
step-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"texture"
uniform-index
]
[
texture>>
]
bi*
drop
0
glUniform1i
]
[
[
"ramp"
uniform-index
]
[
ramp>>
]
bi*
drop
1
glUniform1i
]
}
2cleave
;
USING:
gpu.render
gpu.render.private
kernel
;
M:
uniform-tuple
(bind-uniforms)
2drop
;
USING:
accessors
combinators
gpu.render
gpu.render.private
gpu.shaders
gpu.util
kernel
opengl.gl
;
M:
window-point-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"texture"
uniform-index
]
[
texture>>
]
bi*
drop
0
glUniform1i
]
[
[
"point_size"
uniform-index
]
[
point_size>>
]
bi*
glUniform1f
]
}
2cleave
;
USING:
accessors
combinators
gpu.render
gpu.render.private
gpu.shaders
gpu.util
kernel
opengl.gl
;
M:
window-uniforms
(bind-uniforms)
2dup
M\
uniform-tuple
(bind-uniforms)
{
[
[
"texture"
uniform-index
]
[
texture>>
]
bi*
drop
0
glUniform1i
]
}
2cleave
;