source files: xg.3d-frame-loop.lsp
(require "xg.3d-frame-loop") (XG.3D-FRAME-LOOP :FULL-WINDOW-CAMERA <camera> :CAMERA-LIST <camera-list>)
This is a simple function for repetitively updating the screen and running any active widgets.
The <camera> should be an instance of CLASS-CAMERA sized to fill the window -- it is used for clearing the window, among other things.
The <camera-list> should be a list containing all cameras to be displayed on the screen. <camera> need not be in <camera-list>.
The global XG.3D-FRAME-LOOP-CAMERA-LIST is used to hold <camera-list> while XG.3D-FRAME-LOOP is running; it may be updated as desired by user code in order to change the window display.
Before entering its main loop, XG.3D-FRAME-LOOP sets XG.3D-FRAME-LOOP-DONE to NIL. The main loop will exit if this variable is set non-NIL by some user function.
At the start of each frame, XG.3D-FRAME-LOOP binds XG.3D-FRAME-LOOP-CAMERA to <camera> and then calls XG.3D-PER-FRAME-HOOK, thus providing one mechanism for updating datastructures each frame.
Most application code is of course invoked by (e.g.) :DOWNCLICK-HOOK functions attached to displayed things.