Handbook
Glossary
end-world ( world -- )
Factor handbook
»
UI framework
»
Implementing new gadgets
»
Customizing gadget appearance
»
Implementing custom drawing logic
»
Subclassing worlds
Prev:
begin-world ( world -- )
Next:
resize-world ( world -- )
Vocabulary
ui
.
gadgets
.
worlds
Inputs
world
a
world
Outputs
None
Word description
Called immediately before
world
's OpenGL context is destroyed. The world's OpenGL context is current when this method is called.
Definition
IN:
ui.gadgets.worlds
GENERIC:
end-world
( world -- )
Methods
USING:
accessors
bunny
destructors
kernel
sequences
ui.gadgets.worlds
;
M:
bunny-world
end-world
dup
find-gl-context
[
geom>>
[
dispose
]
when*
]
[
draw-seq>>
[
[
dispose
]
when*
]
each
]
bi
;
USING:
accessors
destructors
game.input
game.loop
game.worlds
kernel
ui.gadgets.worlds
;
M:
game-world
end-world
dup
game-loop>>
[
stop-loop
]
when*
[
end-game-world
]
[
audio-engine>>
[
dispose
]
when*
]
[
use-game-input?>>
[
close-game-input
]
when
]
tri
;
USING:
game.input
generic
kernel
tools.deploy.test.8
ui.gadgets.worlds
;
M:
my-world
end-world
[
M\
my-world
end-world
(call-next-method)
]
[
drop
close-game-input
]
bi
;
USING:
kernel
ui.gadgets.worlds
ui.gadgets.worlds.null
;
M:
null-world
end-world
drop
;
USING:
accessors
combinators
kernel
opengl.framebuffers
opengl.shaders
opengl.textures
spheres
ui.gadgets.worlds
;
M:
spheres-world
end-world
{
[
reflection-framebuffer>>
[
delete-framebuffer
]
when*
]
[
reflection-depthbuffer>>
[
delete-renderbuffer
]
when*
]
[
reflection-texture>>
[
delete-texture
]
when*
]
[
solid-sphere-program>>
[
delete-gl-program
]
when*
]
[
texture-sphere-program>>
[
delete-gl-program
]
when*
]
[
plane-program>>
[
delete-gl-program
]
when*
]
}
cleave
;
USING:
accessors
sequences
ui
ui.gadgets.worlds
window-controls-demo
;
M:
window-controls-demo-world
end-world
windows>>
[
close-window
]
each
;
USING:
kernel
ui.gadgets.worlds
;
M:
world
end-world
drop
;