Order of Execution
From Moviesandbox
This are the functions that are getting called in the beginning of Moviesandbox.
Contents |
[edit] 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)
- calls InspectorManager->setup()
- checks for multisdample capabilities
- generates picking Texture
- creates Main Rendering FBO (multisampleBuffer)
- creates Lighting FBO (lighting)
- creates Shadow FBO (shadow)
- start Loop
[edit] Main Loop
- calls Renderer->update
- all Nodes get updated
- all NodeIOs get updated
- all Buttons get updated 'this happens again in Input!'
- 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) 'this happened before in Renderer!'
- 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
[edit] Pressing a Button
soon...
[edit] Pressing a Key
soon...
[edit] Running the simulation
soon...
[edit] Loading
soon...