Main Loop Flow

Overview over what happens in the main loop and when.

  • Render
    • List3D? update props
      • Cameras
      • Lights
      • Projectors
    • VisTest?
      • Add nodes to OcTrees?
      • Visibility testing
      • Projectors testing
      • Lights minimum range finding
    • List3D? Update & draw
      • Draw sets
        • Update visible nodes
          • Matrix update
          • Animation update
          • Lights querying
          • Projectors querying
        • Draw views
          • Prepare view
            • setup viewport (bounding rectangle)
            • Camera
            • Sun
            • Fill draw layers
          • Process render commands (rcmd)
    • List2D? update & draw
      • Recursively for each node
        • Sort children
        • Draw children
      • Draw stats
    • Console Draw
  • SoundList?
    • Update soundnodes
    • Play soundnodes
  • Lua Think
    • process think-functions in lua scripts
  • ActorList?
    • Automatic positions
    • Matrix update
  • SceneTree?
    • Recompile Tree if needed
      • Matrix update