Difference between revisions of "Viewer Architecture"

From Second Life Wiki
Jump to navigation Jump to search
Line 1: Line 1:
{{OSWikiLearnBox}}
{{OSWikiLearnBox}}


== Sub-Systems ==
The Second Life client (also known as the "viewer") is a complex piece of software. It can be visualized as a streaming media client like RealPlayer, a game engine like Quake 3, or a web browser.
* Asset System
 
* Inventory
First you'll need to learn some [[Second Life Terminology]], like "agent", "sim", and "region".
* Rendering
 
** AGP
If you like to learn by example, you can learn about:
** Drawables
* [[Adding a menu item]]
** viewer object
* [[Adding a dialog]]
** avatar
* [[How movement works]]
** octtree
* [[How the camera works]]
* UI
* [[How login works]]
* Media
* [[How keyboard processing works]]
* Sound
* [[How scripts work]]
* IPC
 
** TCP/pipes & pumps
If you prefer a more hierarchical approach, the viewer is built from:
** llmessagesystem
* [[Message System]] - reliable and unreliable transport over UDP
* VFS
* [[Image System]] - prioritizes and decodes JPEG2000 images into OpenGL textures
* [[Viewer Object System]] - objects in scene for rendering and editing
* [[Rendering System]] - from viewer object to drawable to face to vertices to graphics card
* [[Culling]] - octree and occlusion based culling to speed rendering
* [[UI Widgets]] - cross platform buttons, scroll bars, etc.
* [[UI Floaters]] - dialogs and windows built from XML files
* [[Asset System]] - transport for animations, sounds, notecards, scripts, etc.
* [[Inventory]] - server-side storage of assets for each user
* [[Sound System]] - cross platform audio based on FMOD
* [[Movie System]] - QuickTime-based video on object surfaces
* [[VFS]] - cached data is held in two "virtual file systems" in large files on the client
* [[Selection Manager]] - holds extended information for selected objects and allows editing
* [[Avatar Appearance]] - appearance is constructed from a mesh, parameters to deform the mesh, and textures to describe clothing
* [[Avatar Profiles]]
* [[Groups]]
* [[Money]]


== Threads ==
== Threads ==

Revision as of 16:52, 30 October 2006

The Second Life client (also known as the "viewer") is a complex piece of software. It can be visualized as a streaming media client like RealPlayer, a game engine like Quake 3, or a web browser.

First you'll need to learn some Second Life Terminology, like "agent", "sim", and "region".

If you like to learn by example, you can learn about:

If you prefer a more hierarchical approach, the viewer is built from:

  • Message System - reliable and unreliable transport over UDP
  • Image System - prioritizes and decodes JPEG2000 images into OpenGL textures
  • Viewer Object System - objects in scene for rendering and editing
  • Rendering System - from viewer object to drawable to face to vertices to graphics card
  • Culling - octree and occlusion based culling to speed rendering
  • UI Widgets - cross platform buttons, scroll bars, etc.
  • UI Floaters - dialogs and windows built from XML files
  • Asset System - transport for animations, sounds, notecards, scripts, etc.
  • Inventory - server-side storage of assets for each user
  • Sound System - cross platform audio based on FMOD
  • Movie System - QuickTime-based video on object surfaces
  • VFS - cached data is held in two "virtual file systems" in large files on the client
  • Selection Manager - holds extended information for selected objects and allows editing
  • Avatar Appearance - appearance is constructed from a mesh, parameters to deform the mesh, and textures to describe clothing
  • Avatar Profiles
  • Groups
  • Money

Threads

The viewer is a single process with a few threads:

  • Main thread -- The input/output main program function.
  • VFS Thread -- Thread responsible for reading/writing to the virtual file system.
  • LFS Thread -- Thread responsible for some reading/writing to the local file system. Not sure if this is actually used anywhere.

Program Flow

  • Initialize
  • Loop
    • Gathers input
    • Pumps the TCP i/o
    • Render the frame
  • Shutdown