Handbook
Glossary
resize-world ( world -- )
Factor handbook
»
UI framework
»
Implementing new gadgets
»
Customizing gadget appearance
»
Implementing custom drawing logic
»
Subclassing worlds
Prev:
end-world ( world -- )
Next:
draw-world* ( world -- )
Vocabulary
ui
.
gadgets
.
worlds
Inputs
world
a
world
Outputs
None
Word description
Called when the window containing
world
is resized. The
loc
and
dim
slots of
world
will be updated with the world's new position and size. The world's OpenGL context is current when this method is called.
Definition
IN:
ui.gadgets.worlds
GENERIC:
resize-world
( world -- )
Methods
USING:
accessors
generic
gpu.demos.bunny
gpu.framebuffers
kernel
ui.gadgets.worlds
;
M:
bunny-world
resize-world
[
M\
bunny-world
resize-world
(call-next-method)
]
[
[
sobel>>
framebuffer>>
]
[
dim>>
]
bi
resize-framebuffer
]
bi
;
USING:
accessors
kernel
opengl
opengl.demo-support
opengl.gl
ui.gadgets.worlds
;
M:
demo-world
resize-world
GL_PROJECTION
glMatrixMode
glLoadIdentity
[
[
{
0 0
}
]
dip
dim>>
gl-viewport
]
[
demo-world-frustum
glFrustum
]
bi
;
USING:
kernel
ui.gadgets.worlds
ui.gadgets.worlds.null
;
M:
null-world
resize-world
drop
;
USING:
accessors
kernel
papier
papier.render
ui.gadgets.worlds
;
M:
papier-world
resize-world
[
uniforms>>
]
[
dim4
fov
near-plane
far-plane
<p-matrix>
]
bi
>>p_matrix
drop
;
USING:
accessors
generic
gpu.demos.raytrace
kernel
math
math.order
math.vectors
sequences
ui.gadgets.worlds
;
M:
raytrace-world
resize-world
[
M\
raytrace-world
resize-world
(call-next-method)
]
[
dup
dim>>
dup
first2
min
>float
v/n
fov
v*n
>>fov
drop
]
bi
;
USING:
accessors
kernel
opengl
opengl.gl
terrain
ui.gadgets.worlds
;
M:
terrain-world
resize-world
GL_PROJECTION
glMatrixMode
glLoadIdentity
dim>>
[
[
{
0 0
}
]
dip
gl-viewport
]
[
frustum
glFrustum
]
bi
;
USING:
accessors
gpu.state
gpu.util.wasd
kernel
ui.gadgets.worlds
;
M:
wasd-world
resize-world
[
<viewport-state>
set-gpu-state*
]
[
dup
generate-p-matrix
>>p-matrix
drop
]
bi
;
USING:
kernel
ui.gadgets.worlds
;
M:
world
resize-world
drop
;