Order of Execution

From Moviesandbox

(Difference between revisions)
Jump to: navigation, search
(New page: This are the functions that are getting called in the beginning of Moviesandbox. <h3>Program Start</h3> * construct an intermediate window and check for OpenGL versions and Extensions. *...)
Line 9: Line 9:
* construct an Input Object
* construct an Input Object
* call ''Renderer -> loadPreferences()''
* call ''Renderer -> loadPreferences()''
- 
** opens config.xml file
** opens config.xml file
** loads rendering preferences from xml file (such as window size, multisampling, etc...
** loads rendering preferences from xml file (such as window size, multisampling, etc...
Line 28: Line 27:
*** creates new ''Controller''
*** creates new ''Controller''
*** calls ''Controller->setup()''
*** 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
*** clears FPS Buffer
** creates new Content Class (which is used for interface setup)
** creates new Content Class (which is used for interface setup)
Line 45: Line 48:
* start Loop
* start Loop
 +
 +
<h3>Main Loop</h3>
 +
* 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
 +
** calls PhysicsUpdate if updating physics is enabled
 +
** calls draw() on windows or glutPostRedisplay() on MacOS
[[Category:Coding]]
[[Category:Coding]]

Revision as of 20:20, 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
    • calls PhysicsUpdate if updating physics is enabled
    • calls draw() on windows or glutPostRedisplay() on MacOS
Personal tools
Moviesandbox for UT2004