Order of Execution

From Moviesandbox

(Difference between revisions)
Jump to: navigation, search
m (Startup Functions moved to Order of Execution: Better describes what's actually in the page)
Line 70: Line 70:
**** eventTrigger gets cleared
**** eventTrigger gets cleared
**** calls navTool->processMove()
**** calls navTool->processMove()
-
*** InspectorManager gets updated
 
*** lastKey gets set to 0
*** lastKey gets set to 0
*** increment mouse Button counters if appropriate
*** increment mouse Button counters if appropriate

Revision as of 20:31, 7 September 2010

This are the functions that are getting called in the beginning of Moviesandbox.

Program Start

  • construct an intermediate window and check for OpenGL versions and Extensions.
  • destroy intermediate Window
  • create either an X1600Renderer Object (for OpenGL 2.0) or a regular Renderer Object(for OpenGL 2.1)
  • construct an Input Object
  • call Renderer -> loadPreferences()
    • opens config.xml file
    • loads rendering preferences from xml file (such as window size, multisampling, etc...
    • fills library vector with all libraries found in xml file
    • sets up my.library if not already existing
  • call Renderer -> initWindow()
    • creates Moviesandbox OpenGL context and window
  • call Renderer -> setup()
    • setup ODE Physics
    • build Object Tables for RTTI and Serialization
    • create Base Layer FBO
    • add Brush
    • add Grid
    • calls Input->setup
      • creates new InspectorManager
      • creates new Controller
      • calls Controller->setup()
        • creates all Tools
        • setup all Tools
        • set current Tool to STATE_SELECT
        • change filter on second draw Tool to Calligraphy Filter
      • clears FPS Buffer
    • creates new Content Class (which is used for interface setup)
    • calls Content->setup
    • calls Input->getAllPrefabs
    • cycles through and libraries
    • calls Input->loadMeshes with current library
    • calls Input->loadTextures with current library
    • calls Input->loadShaders with current library
    • calls Input->loadActionList with current library
    • calls Input->loadAll with startSceneFileName from config.xml (loads scene contents)
    • checks for multisdample capabilities
    • generates picking Texture
    • creates Main Rendering FBO (multisampleBuffer)
    • creates Lighting FBO (lighting)
    • creates Shadow FBO (shadow)
  • start Loop


Main Loop

  • calls Renderer->update
    • all Nodes get updated
    • all NodeIOs get updated
    • all Actors get assigned an ActorID (int that gives their location in ActorList)
    • all Actors get updated
    • all helpers get updated
    • calls Input->update
      • hudTarget is set NULL
      • worldTarget is set NULL
      • staticButton is updated (if not NULL) and set to focusButton
      • Buttons get updated (if bAlwaysUpdate)
      • Buttons not Hidden get checked for mouseOver and assigned to hudTarget if mouseOver and their Button->mouseOver function called
      • ActorMenu (if exists) gets updated
      • Controller gets updated
        • current Tool gets updated
        • eventTriggers get transferred from input->eventTrigger to control->eventTrigger
        • input->eventTrigger get cleared
        • Nodes get updated if we're running the simulation
        • eventTrigger gets cleared
        • calls navTool->processMove()
      • lastKey gets set to 0
      • increment mouse Button counters if appropriate
      • 0 out mouseVector
    • calls PhysicsUpdate if updating physics is enabled
    • calls draw() on windows or glutPostRedisplay() on MacOS
Personal tools
Moviesandbox for UT2004