sphere-scene ( gadget -- )


Vocabulary
spheres

Inputs
gadgetan object


Outputs
None

Definition


: sphere-scene ( gadget -- )
16640 glClear [
solid-sphere-program>> [
{
[
"light_position" glGetUniformLocation
0.0 0.0 100.0 glUniform3f
]
[
{ 7.0 0.0 0.0 } 1.0
{ 1.0 0.0 0.0 1.0 } (draw-colored-sphere)
]
[
{ -7.0 0.0 0.0 } 1.0
{ 0.0 1.0 0.0 1.0 } (draw-colored-sphere)
]
[
{ 0.0 0.0 7.0 } 1.0
{ 0.0 0.0 1.0 1.0 } (draw-colored-sphere)
]
[
{ 0.0 0.0 -7.0 } 1.0
{ 1.0 1.0 0.0 1.0 } (draw-colored-sphere)
]
[
{ 0.0 7.0 0.0 } 1.0
{ 1.0 0.0 1.0 1.0 } (draw-colored-sphere)
]
[
{ 0.0 -7.0 0.0 } 1.0
{ 0.0 1.0 1.0 1.0 } (draw-colored-sphere)
]
} cleave
] with-gl-program
] [
plane-program>> [
{
[
"checker_size_inv" glGetUniformLocation
0.125 glUniform1f
]
[
"checker_color_1" glGetUniformLocation
1.0 0.0 0.0 1.0 glUniform4f
]
[
"checker_color_2" glGetUniformLocation
1.0 1.0 1.0 1.0 glUniform4f
]
} cleave GL_QUADS [
-1000.0 -30.0 1000.0 glVertex3f
-1000.0 -30.0 -1000.0 glVertex3f
1000.0 -30.0 -1000.0 glVertex3f
1000.0 -30.0 1000.0 glVertex3f
] do-state
] with-gl-program
] bi ;