Subclassing worlds
Factor handbook » UI framework » Implementing new gadgets » Customizing gadget appearance » Implementing custom drawing logic

Prev:The UI coordinate system
Next:OpenGL utility words

The world gadget can be subclassed, giving Factor code full control of the window's OpenGL context. The following generic words can be overridden to replace standard UI behavior:
begin-world ( world -- )

end-world ( world -- )

resize-world ( world -- )

draw-world* ( world -- )

See the spheres and bunny demos for examples.