Handbook
Glossary
demo-frame ( window -- pixels )
Vocabulary
demos
.
smoke-test
Inputs
window
an
object
Outputs
pixels
an
object
Definition
USING:
accessors
byte-arrays
grouping
kernel
math
opengl
opengl.gl
sequences
ui.gadgets.worlds
;
IN:
demos.smoke-test
::
demo-frame
( window -- pixels )
window
active?>>
t
assert=
window
set-gl-context
window
draw-world*
window
dim>>
[
gl-scale
>fixnum
]
map
first2
:>
( width height ) width 0
>
height 0
>
and
t
assert=
width height
*
4
*
<byte-array>
:>
pixels 0 0 width height
GL_RGBA
GL_UNSIGNED_BYTE
pixels
glReadPixels
gl-error
window
title>>
blank-window-titles
member?
[
pixels 4
<groups>
dup
first
'[
_
=
]
all?
f
assert=
]
unless
pixels
;