Handbook
Glossary
draw-sphere-basic ( color -- )
Vocabulary
rlgl
.
demo
Inputs
color
an
object
Outputs
None
Definition
USING:
accessors
combinators.extras
kernel
math
math.functions
ranges
rlgl
sequences
;
IN:
rlgl.demo
::
draw-sphere-basic
( color -- )
16 16
:>
( rings slices ) rings 2
+
slices 6
*
*
rl-check-render-batch-limit
drop
RL_TRIANGLES
rl-begin
color
[
r>>
]
[
g>>
]
[
b>>
]
[
a>>
]
quad
rl-color4ub
rings 2
+
[0..b)
slices
[0..b)
[|
i j |
270 180 rings 1
+
/
i
*
+
deg>rad
cos
j 360
*
slices
/
deg>rad
sin
*
270 180 rings 1
+
/
i
*
+
deg>rad
sin
270 180 rings 1
+
/
i
*
+
deg>rad
cos
j 360
*
slices
/
deg>rad
cos
*
rl-vertex3f
270 180 rings 1
+
/
i 1
+
*
+
deg>rad
cos
j 1
+
360
*
slices
/
deg>rad
sin
*
270 180 rings 1
+
/
i 1
+
*
+
deg>rad
sin
270 180 rings 1
+
/
i 1
+
*
+
deg>rad
cos
~231 more~
]
cartesian-each
rl-end
;