IRIS Performer 1.2 Technical Information
Silicon Graphics Computer Systems

 "The Performer"
 "The Performer"
Read the IRIS Performer 1.2 Release Notes
View a complete listing of the IRIS
Performer 1.2 API

Technical Overview of IRIS Performer 1.2
     IRIS Performer is an extensible software environment for
     developing high-performance real-time graphics applications.
     Written using IrisGL, it is compatible with all SGI graphics
     platforms and can extract maximum performance from each of
     them.  IRIS Performer provides the efficient low-level tools
     needed by developers of advanced visual simulation, training,
     entertainment, virtual reality, and advanced design
     applications.
     If you are have already installed IRIS Performer, the best way
     to start learning about it is to go for a test drive.  All that
     you need to do is type:
	/usr/src/Performer/bin/perfly esprit.flt
     Type "man pfuXformer" for details on how to drive, fly, or
     tumble, and rerun Perfly with the command line option "-help"
     for a full list of features, and type "?" while running Perfly
     for a list of keyboard command sequences.
     Now that you've seen IRIS Performer in action, you will want to
     learn more about how it works.  Even though the IRIS Performer
     Programming Guide and the IRIS Performer Release Notes are the
     primary sources of information, the following overview will give
     you a head start in your learning process.
     IRIS Performer consists of two main libraries, libpf and libpr,
     and two utility libraries, libpfutil and libpfsgi. In addition
     to these SGI-developed tools, this release of IRIS Performer
     also includes sample code, databases, games, and movies
     contributed by the Friends of Performer: companies and
     individuals with services of general interest to the IRIS
     Performer community.
     Libpr is a low level library that provides high speed rendering
     functions (pfGeoSets), efficient graphics state control,
     (pfGeoStates), and other application-neutral functions.  Libpf
     is a real-time visual simulation environment that extends libpr
     to create a high-performance multiprocessing database rendering
     system that takes best advantage of IRIS symmetric
     multiprocessing CPU hardware.
     Libpr consists of many facilities generally required for
     real-time and other performance-oriented graphics
     applications:
-  High-speed rendering functions using the innovative pfGeoSet.
-  Efficient graphics state management and mode control based on the pfGeoState.
-  Display lists suitable for rendering between multiple processes.
-  An extensive collection of fast linear algebra and math routines
-  Intersection computation and detection services.
-  A color table mechanism for rapid switching of database appearance.
-  Asynchronous file I/O system for real-time file operations.
-  Memory allocation oriented to shared memory and mutual exclusion.
-  High speed clock functions that hide the complexities of hardware clocks.
libpf is a much higher level library built on top of libpr that
     is architected and implemented to solve the specific needs of
     real-time graphics development.  Applications developed with
     libpf are able to provide smooth motion through elaborate scenes
     at programmable frame rates, all with very little code
     development.  libpf provides:
- Hierarchical scene graph processing and operators.
- Transparent multiprocessing for parallel simulation, culling and drawing.
- Graphics load measurement and frame rate management.
- Level of detail selection with smooth fade and rotational invariance.
- Rapid culling to the viewing frustum through hierarchic bounding
	  volumes.
- Multiprocessed Intersection detection and reporting.
- Dynamic coordinate systems for highly interactive graphics.
- Multibuffering of changes to the scene graph for simple multiprocessing.
     Description of libpr
     GeoSet
 A GeoSet is  a collection of drawable geometry
     which groups same-type graphics primitives (e.g. triangles or
     quads) into one data object.  The GeoSet contains no geometry
     itself, only pointers to data arrays and index arrays.  Geometry
     arrays may be indexed or non-indexed (i.e.  stored in order)
     depending upon application requirements.  Because all the
     primitives in a GeoSet are of the same type and have the same
     attributes, rendering of most database is performed at maximum
     hardware speed.  There are many GeoSet rendering routines, one
     for each combination of geometry and attribute specification.
     All GeoSet rendering is performed by a single (very busy)
     routine, pfDrawGSet().
     
GeoState
 GeoStates provide a graphics state definitions
     (e.g. texture or material) for GeoSets.  When used in
     conjunction with Performer state management functions, GeoSets
     can be rendered in a prescribed way without concern to the
     inherited mode of the machine.  GeoSets may share GeoStates and
     not all machine modes are supported.
     
State Management and Mode Control
 Performer provides
     functions that are "wrappers" around GL state control functions,
     such as, lighting, materials, texture, transparency, etc..  They
     have two purposes, to track state, and to allow the creation of
     display lists, that can be rendered later.  The application
     program can affect state in three ways: globally, locally
     (GeoState), and directly.  State changes made using GL directly
     are not "known" to Performer state tracking mechanisms, and thus
     defeat Performer state management.  However, functions exist to
     push state, pop state, and get the current state so intermixing
     GL and Performer programs can be accomplished.
     
Display Lists 
 Performer supports display lists.  These
     are not GL objects, but rather a simply token / data mechanism
     that does not cache geometry data.  These display lists use only
     Performer state and rendering commands.  They also support
     function callbacks to allow application programs to perform any
     required special processing during display list rendering.
     
Math Support
 An Extensive set of point, segment,
     vector, plane, matrix, cylinder, sphere and frustum functions
     are provided.
     
Intersections
 Functions are provided to perform
     intersections of segments with cylinders, spheres, boxes,
     planes, and geometry.  Intersection functions for spheres,
     cylinders, and frustums are also provided.
     
ColorTables
 IRIS Performer supports color tables, where
     GeoSet color indexes may refer to common tables of color
     information.  Color tables are global and may be of any size.
     There may be any number of color tables existing at one time,
     however, only one active at a time.  The active color table may
     be switched in real-blocking file access
     method is provided to allow applications to retrieve file data
     during real-time operation.
     
Memory Allocation
Performer includes routines to
     allocate memory from users heap, shared arena memory, or
     datapool memory.  Shared arenas must be used when multiple
     process need to share data.  The arena must be created by the
     application.  Datapools allow the application to create a shared
     arena visible to any process.  These datapools also support
     record locking on a per "chunk" basis.
     
High Speed Clock
 Performer includes a high speed clock
     access routine that reports the time in double precision
     floating point seconds from the time it was initialized.  The
     resolution of this clock depends on machine and
     configuration.
     
Statistics 
Performer can maintain statistics on the geometry
     that it draw, state changes and transformations, and internal
     operations.  These statistics can used for tuning your
     application, as well as your own load management.
     Description of libpf
     Multiprocessing
     libpf provides a pipelined	multiprocessing	model for implementing visual
     simulation	applications.  The simulation, visibility culling and drawing
     can all run in separate processes.	 The simulation	process	updates	the
     scene, the	cull process traverses the scene checking for visibility and
     generates display lists which are then rendered by	the drawing process.
     libpf's multibuffering capabilities allows	each process to	have copies
     appropriate to its	target frame time.
     The simulation, culling, and drawing for a graphics pipeline may
     be combined into  one, two or three processes to allow an
     application to be tailored to different hardware and expected
     CPU demand in each process, for example normally drawing is done
     by a separate process in order to maintain maximum graphics
     performance, but if an application is simulation bound, it may
     wish to combine the cull and draw into a single process.
     Statistics are maintained on the tasks of each of the IRIS
     Performer processes of application, cull and draw.  These
     statistics can be displayed in a channel, printed, and queried.
 Graphics Pipes and Channels 
     In addition to the functionality it derives from libpr, libpf
     supports multiple channels per graphics pipe, grouping of
     channels to form video walls, and frame synchronization between
     multiple graphics pipes.
     libpf maintains a graphics stress value for each channel and
     uses it to attempt to maintain a fixed frame rate by
     manipulating levels-of-detail (LODs).
     Like many other graphics libraries, libpf assumes a coordinate
     system with +Z up, +X to the right and +Y into the screen.
     Database
     libpf supports a general database hierarchy which consists of
     the following node types:
    pfNode           General node (base class)
    pfScene          Top level node.
    pfGroup          Node with multiple children.
    pfSCS            Static coordinate system.
    pfDCS            Dynamic coordinate system.
    pfLayer          Layer or decal node.
    pfLOD            Level of detail node.
    pfSwitch         Switch node.
    pfSequence       Sequential animation node.
    pfGeode          Fundamental geometry node.
    pfBillboard      Special tracking leaf node.
    pfLightPoint     One or more emissive light points.
    pfLightSource    Definition of a graphics hardware light.
    pfPartition      Special culling acceleration node.
     All of the above are types of pfNodes and any function which
     requires a pfNode* as an argument can accept any of the above
     types.  Similarly pfSCS, pfDCS, pfLOD, pfSequence and pfSwitch
     all behave as groups and can be used in any function which takes
     a pfGroup* as an argument.
     Nodes can be assembled into a directed acyclic graph (DAG) which
     represents a scene and modeling hierarchy.  Geometry and
     graphics state information is contained in pfGeoStates and
     pfGeoSets in pfGeodes.
     Intersection inquiries are made via groups of line segments
     which can be tested against a subgraph of the scene.  Masks and
     callbacks can be specified to allow evaluation of line-of-sight
     (LOS) visibility, colli- sions, terrain intersections, etc.
     Visual Simulation Features
     libpf provides earth-sky and weather functions for modeling fog,
     haze and other atmospheric effects.  Here is the structure of a
     typical program:
-  Initialize IRIS Performer with pfInit.
-  Specify number of graphics pipelines with pfMultipipe and
     choose the multiprocessing configuration by calling
     pfMultiprocess.
-  Begin multiprocessing and fork processes with pfConfig.
-  Initialize the pipe frame rate with pfFrameRate and set the
     frame-extend policy with pfPhase.
-  Create and configure display channels with pfNewChan,
     pfChanCullFunc, pfChanDrawFunc, pfChanFOV, and pfChanScene.
	
	  Main simulation loop:
	- Compute dynamics, update pfDCSes, etc.
	
-  Go to sleep till frame time: pfSync
	
-  Latency critical updates such as viewpoint
	
-  Draw frame: pfFrame 
	
 

Compiled by: Allan Schaffer