Handbook
Glossary
terrain-frame ( world -- pixels )
Vocabulary
terrain
.
smoke-test
Inputs
world
an
object
Outputs
pixels
an
object
Definition
USING:
accessors
byte-arrays
kernel
math
opengl
opengl.gl
sequences
sets
ui.gadgets.worlds
;
IN:
terrain.smoke-test
::
terrain-frame
( world -- pixels )
world
active?>>
t
assert=
world
set-gl-context
world
draw-world*
world
dim>>
first2
:>
( width height ) width height
*
4
*
<byte-array>
:>
pixels 0 0 width height
GL_RGBA
GL_UNSIGNED_BYTE
pixels
glReadPixels
gl-error
pixels
members
length
16
>
t
assert=
pixels
;