As described in Chapter 1, OpenGL Multipipe consists of three main components: an X proxy layer, a proxy 3D render library, and 3D render servers. This chapter describes how to effectively use these components with your graphics applications. The following sections describe the pertinent tasks:
For information about other features of OpenGL Multipipe specific to this release, see the release notes in the following file:
/usr/share/omp/release_notes/user/relnotes.html |
To begin using OpenGL Multipipe, you must enable an X proxy layer. This will cause all applications to see a single logical pipe. To deactivate OpenGL Multipipe, just disable the X proxy layer. Some of the steps required to enable or disable OpenGL Multipipe may require root access. This section notes this requirement in the applicable steps.
This section describes the following tasks:
DMX will group multiple screens into a logical display. This section describes how you initialize DMX and how to create DMX configuration files.
To initialize DMX, do the following:
If your system supports SGI Xinerama, ensure that it is not currently enabled.
To determine if SGI Xinerama is enabled, see the section “Verifying That the OpenGL Multipipe Environment is Enabled”. If enabled, disable SGI Xinerama and restart the X server.
Enter the following to disable SGI Xinerama:
# chkconfig xinerama off |
Enter the following as root in a command shell to restart the X server:
# (/usr/gfx/stopgfx; /usr/gfx/gfxinit; /usr/gfx/startgfx) & |
The X server has to be restarted for the chkconfig change to take effect. With SGI Xinerama disabled, the X server will manage pipes as separate screens.
Run DMX on top of the existing X server(s).
You may do this manually after logging into your desktop or you may configure an .xsession script to run DMX immediately upon login.
To manually initialize DMX, enter the following (root access not needed) in a command shell:
$ ompstartdmx |
You can use the flag –help for more information about the starting options. If you specify no flags, DMX starts on top of the existing X server and will configure a single large screen that overlays the existing n screens such that screen 0 will be the leftmost and screen n –1 will be the rightmost. To use a different configuration, such as a vertical configuration, you must provide a DMX configuration file. The following section “Creating DMX Configuration Files”describes how to create such a configuration file.
By default on IRIX, ompstartdmx will run the following clients unless a session script has been specified: 4Dwm, toolchest, and winterm. On Linux, only xterm will be started as the session. For more details, see the later subsection “Differences between the IRIX and Linux Versions of ompstartdmx”.
You can configure DMX to run automatically upon login. How you do so depends on your operating system.
Configuring DMX to Run Automatically on IRIX
To configure DMX to run automatically upon login, you need to start with an .xsession file in your $HOME directory. If you do not already have one, you may copy one of the example .xsession files provided from the /usr/share/omp/examples/X11 directory, or you may copy the main system Xsession file from /var/X11/xdm/Xsession by entering the following:
$ cp /var/X11/xdm/Xsession $HOME/.xsession $ chmod +w $HOME/.xsession |
The second command ensures the file is writeable. If not already present, add the following lines at the beginning of your $HOME/.xsession file:
if [ -x /usr/bin/ompstartdmx -a -z “$SGIOMP_META_DISPLAY” ]; then
/usr/bin/ompstartdmx -wm none -session /var/X11/xdm/Xsession
exit
fi
|
Note that the if clause is necessary to prevent infinite recursion. Also, note that –wm none is only needed if your .xsession script starts a window manager by itself (which is the case if you copied the system Xsession file). Only one window manager can be started on a display, and without the –wm none argument, ompstartdmx would try to start a window manager by default, which would result in an error.
For more information about .xsession files, see the X(1) and xdm(1) man pages.
Configuring DMX to Run Automatically on Linux
This following describes how you configure DMX to run automatically upon login using GDM, KDM, or XDM.
Using GDM
At the login screen, choose one of the following from the the Session menu:
GNOME-OpenGL-Multipipe KDE-OpenGL-Multipipe |
Choosing one of those will start DMX with a GNOME or KDE session, respectively.
The session will use the default DMX configuration. If the display is managing only one screen, an appropriate message will be displayed.
If you want to customize the ompstartdmx options (for example, to use a special DMX configuration file), modify the script(s) in the directory /etc/X11/gdm/Sessions/GNOME-OpenGL-Multipipe or /etc/X11/gdm/Sessions/KDE-OpenGL-Multipipe. You can also copy and add your own session scripts in the /etc/X11/gdm/Sessions directory.
Using KDM
You will need to configure KDM to add more session type options to the Session type menu of the KDM login screen. OpenGL Multipipe does not provide any scripts or automation for doing this. You must also configure the new session type to start ompstartdmx or to use a session script provided by OpenGL Multipipe in directory /etc/X11/gdm/Sessions.
The following steps describe one way to add a new session type, to set the associated session script, and to write that script:
In file /etc/X11/xdm/kdmrc, add the label for your new session type to the comma-separated list for the variable SessionTypes.
The label (for example, KDE-OpenGL-Multipipe) will be displayed in the option menu on the login screen and passed as the first argument to the session script.
In file /etc/X11/xdm/kdmrc, set your own session script by replacing the following line with the file path to your script:
Session=/usr/share/config/kdm/Xsession |
For example, you might choose the following:
Session=omp_kdm_session |
Write your session script to look something like the following:
#!/bin/bash if [ “$1” = KDE-OpenGL-Multipipe ]; then exec /etc/X11/gdm/Sessions/KDE-OpenGL-Multipipe elif [ “$1” = GNOME-OpenGL-Multipipe ]; then exec /etc/X11/gdm/Sessions/GNOME-OpenGL-Multipipe else exec /usr/share/config/kdm/Xsession $1 fi |
Using XDM
You can add a few lines to your ~/.xsession script, see ompstartdmx –help for more details. The Linux procedure is slightly different than that of IRIX.
After DMX has initialized, you will see a new session covering all the screens. At this point, you can start using OpenGL Multipipe by running applications with omprun (see “Running Applications with OpenGL Multipipe”).
Differences between the IRIX and Linux Versions of ompstartdmx
This section lists differences (and one noteworthy similarity) in the behavior and command-line options of the ompstartdmx script between IRIX and Linux:
On Linux, there is no –wm option. The window manager is the default window manager for GNOME or KDE. Use their standard tools to set your preferred window manager.
On Linux, the ompstartdmx script will return control only when the session ends. On IRIX, it returns control once the session starts.
On Linux, the valid options for the –session flag are as follows:
[ -session {gnome | kde | noaware | scriptname} ]
|
| Option | Behavior | |
| –session unspecified | Starts a single xterm as the session. The session ends when this xterm dies. | |
| gnome | Starts a GNOME session with aware support if GNOME is installed; otherwise, xterm will be used. | |
| kde | Starts a KDE session with aware support if KDE is installed; othersise, xterm will be used. | |
| noaware | Launches without aware window management the default session that would run with the startx command. | |
| scriptname | Runs the script as the session. When the script returns control, the session ends. Note:The ompstartdmx script does not launch any window manager; the session script must do so. |
The way to end the session remains the same: logout or Ctrl-Alt-q.
DMX Limitations on Linux
When using a GNOME session with an aware window manager, the session will not be saved; the default session will be used at each login. This happens because the gnome-wm script does not pass the session ID parameter to any aware window manager, only to those which are supported by the GNOME environment (sawfish, metacity, twm, and their like). When using a KDE or GNOME session without aware window management, the session will be saved and restord at the next login.
A DMX configuration file is simply a text file that describes the configuration of a virtual display, the real displays it manages, and the geometry of the virtual screen. This section provides some short examples of configuration files. These and other example configuration files may be found in the directory /usr/share/omp/examples/dmx .
To start DMX with one of these configurations, do the following:
Save the configuration to a text file with any name—for example, updown.dmx.
Invoke ompstartdmx with the option –cfgfile, as shown in the following entry:
$ ompstartdmx -cfgfile updown.dmx |
It is also possible to place many configurations in a single file. In this case, you can choose one configuration from the file by specifying both the –cfgfile and –cfgname options, as shown in the following:
$ ompstartdmx -cfgfile allmyconfigs.dmx -cfgname updown |
The following example configuration file specifies a vertical layout:
virtual updown 1280x2048 {
display :0.0 1280x1024;
display :0.1 1280x1024 @0x1024;
}
|
This configuration file defines a virtual screen configuration named updown of size 1280x2048. The virtual screen includes the following two real back-end displays:
| Display :0.0 | It has a size of 1280x1024 and is located at location 0x0 in the virtual screen space. | |
| Display :0.1 | It has a size of 1280x1024 and is located at 0x1024 in the virtual screen space. |
You may also define some overlap between each of the screens, as in the following horizontal layout:
virtual overlap 2460x1024 {
display :0.0 1280x1024;
display :0.1 1280x1024 @1180x0;
}
|
This configuration file defines two screens of 1280x1024, each with 100 pixels of overlap, resulting in a virtual screen size of 2460x1024.
The display value specified can be any valid display value, including a display value that specifies a remote machine, as in the following example:
virtual remote 2560x1024 {
display localhost:0.0 1280x1024;
display remotehost:0.1 1280x1024 @1280x0;
}
|
There is also a graphical tool to create and edit configuration files. You can find documentation for this tool in /usr/share/omp/doc/user/xdmxconfig.1.html. The tool is installed in /usr/share/omp/X11/bin/xdmxconfig.
More information about the configuration file format can be found in the file /usr/share/omp/doc/user/Xdmx.1.html.
| Note: SGI Xinerama is not supported on Onyx4 or Silicon Graphics Prism servers. Only the DMX proxy layer is supported on these servers. |
SGI Xinerama groups multiple screens of a single X server into a logical screen. This section describes how you initialize and configure SGI Xinerama.
To configure OpenGL Multipipe with SGI Xinerama as the X proxy layer, perform the following steps:
Enable SGI Xinerama.
If you are enabling SGI Xinerama on your system for the first time, enter the following as root in an IRIX shell:
# chkconfig -f xinerama on |
Otherwise, enter the following to enable SGI Xinerama:
# chkconfig xinerama on |
On systems having only one graphics pipe or in the case where the X server is directed to handle only one pipe (see the Xsgi(1) man page), enabling SGI Xinerama has no effect. In these cases, SGI Xinerama will be disabled, regardless of the value of the xinerama flag supplied on the chkconfig command.
Restart the X server.
The X server has to be restarted for the chkconfig change to take effect. Enter the following as root in an IRIX shell to restart the X server:
# (/usr/gfx/stopgfx; /usr/gfx/gfxinit; /usr/gfx/startgfx) & |
After the X server is started with SGI Xinerama enabled and you have logged in to the system, you can start using OpenGL Multipipe by running applications with omprun (see “Running Applications with OpenGL Multipipe”).
Reality Center environments with multiple projectors and multiple graphics pipes often have overlapping screens. To allow seamless alignment of these screens, projectors typically have edge blending capability.
You control the amount of overlap or gap space between screens by specifying the xoffset and yoffset arguments (in units of pixels) of the –hw parameters in the file /var/X11/xdm/Xservers. For example, if you have three pipes, each with a resolution of 1280 x 1024 and a horizontal overlap of 256 pixels between each screen, you would place the following –hw arguments together on one line in the /var/X11/xdm/Xservers file:
:0 secure /usr/bin/X11/X -boards 4,5,6 -hw board=4,right=1 -hw board=5,left=0,right=2,xoffset=-256 -hw board=6,left=1,xoffset=-256 ... other X server arguments ... |
Notes:
The –boards numbers are physical pipe numbers, but the indexes given to the right, left, above, and below parameters refer to the logical order of the –hw parameters.
The lines are separated in the example only for readability.
See the Xsgi(1) and xdm(1) man pages for more information.
Starting with version 2.5, OpenGL Multipipe uses X11 resources to specify configuration options. This approach allows you to define values per application, per user, and system-wide. This section describes setting these options in the following subsections:
The full name of each OpenGL Multipipe resource has the following format:
OMP.app_name.resource_name |
The app_name field is the application name, defined to be the last component in the running executable path name. The resource_name is one of the available OpenGL Multipipe resources.
You can specify a resource with loose binding—that is, matching the resource for all applications—by using an asterisk in the following manner:
OMP*resource_name |
For more information on the X11 resources and their scope, see the X(1) and XrmInitialize(3) man pages.
The following ordered list of resource files indicates the search path OpenGL Multipipe uses to assign values to the resources:
Resources set with omprun
Resources set with xrdb
$HOME/.Xdefaults
/usr/share/omp/app-defaults/app_name
/usr/share/omp/config
The first match found will be used. However, resources set with the full-name format will always precede resources set with loose binding even if the full-name format is found later in the search path. Resources set with the omprun command always have precedence. For information of the use of the omprun command, see section “Setting Run-Time Options”.
If a resource is not specified in the preceding search path, then the defined default value for that resource will be used.
When you set the environment variable SGIOMP_PRINT_CONFIG to 1, OpenGL Multipipe prints the configuration values it uses to stdout when an application runs through OpenGL Multipipe. This is useful to ensure that any overrides you have specified are being honored.
Each resource value can have one of the following types:
| Type | Description | |
| Bool | A boolean value. Valid values are 0, 1, off, or on. | |
| Enum | Enumeration: one of a specified list of tokens. | |
| Float | A floating point value. | |
| FloatList | A comma-separated list of floating point values. | |
| Int | An integer number. | |
| IntList | A comma-separated list of integer values. | |
| Enum | An enumeration: one of a specified list of tokens. |
Table 3-1 lists all resources with their default values.
Notes:
A resource name is not identical to the name of the associated command-line option of omprun.
The default values might be changed in future releases.
Table 3-1. X11 Resources and Defaults
Resource[a] | Value Type | Default Value |
|---|---|---|
aa2Jitter.X | FloatList | 0.24649, -0.24649 |
aa2Jitter.Y | FloatList | 0.249999, -0.249999 |
aa4Jitter.X | FloatList | -0.208147, 0.203849, -0.292626, 0.296924 |
aa4Jitter.Y | FloatList | 0.353730, -0.353780, -0.149945, 0.149994 |
activeScreens | IntList | The list of all back-end screens of the meta X server |
culling (cull) | Bool | off |
culling.cullUserClipPlanes | Bool | off |
culling.minPixels (minpixels) | Int | 1 |
culling.showStat (cullshow) | Enum: | off |
culling.texCulling | Bool | off |
dlSplit (dlsplit) | Bool | off |
dlSplit.maxDepth | Int | 8 |
dlSplit.maxTotalTris | Int | 400000 |
dlSplit.maxTris (dlsplitmaxtris) | Int | 800 |
dlSplit.showRandomColors (dlsplitshow) | Bool | off |
drawPixelsClipping | Bool | on |
masterMode (mstrmode) | Enum: | track when omprun is used |
masterScreen | Int | 0 |
maxFramesLatency (latency) | Int | 4 |
pbuffers.disable | Bool | off |
pbuffers.layout | Enum: | duplicate |
shmQueueSize | Int | DisplayWidth * DisplayHeight * 4 |
slaveCPUs | IntList | Empty |
swapSyncMode (nosync,swapready) | Enum: | soft |
texShm | Bool | off (unless culling.texCulling is on) |
viewportClippingMode (novpclip) | Enum: | scissor for SGI Xinerama displays and subwin for Xdmx displays |
[a] The associated omprun command-line options are shown in parentheses, where applicable. | ||
This section briefly describes each of the OpenGL Multipipe tunable resources:
aa2Jitter.X and aa2Jitter.Y
Controls the jittering offset for each input pipe when the hardware compositor configured for pixel averaging with two pipes. The value must include two values for both X and Y to specify the frustum offset in pixels on the x and y axes to be applied for the first and second pipe participating in the pixel averaging.
aa4Jitter.X and aa4Jitter.Y
Controls the jittering offset for each input pipe when the hardware compositor configured for pixel averaging with four pipes. The value must include four values for both X and Y to specify the frustum offset in pixels on the x and y axes to be applied for the first, second, third, and fourth pipes participating in the pixel averaging.
activeScreens
Specifies the back-end screens to be active. OpenGL Multipipe will render OpenGL primitives only on those pipes. For example, when Xdmx (or SGI Xinerama) manages three physical screens (pipes), setting the activeScreens resource to 0,1 will make OpenGL rendering to be visible on screens 0 and 1 only. On screens 2 and 3, the OpenGL part of the application windows will be either black or garbage. By default, all managed screens will be active with respect to OpenGL.
culling
Specifies the enable switch for the geometry culling feature of OpenGL Multipipe. It can be either off or on. When this resource is enabled OpenGL Multipipe will draw to each pipe only the geometry primitives that are visible on that pipe. The default value for this switch is off. For more information, see section “Geometry Culling” in Chapter 4.
culling.cullUserClipPlanes
Enables culling against user-defined clip planes when one of GL_CLIP_PLANEi is enabled. The default value is off, in which case OpenGL Multipipe will cull only against the viewing frustum.
culling.minPixels
Specifies approximate culling—that is, the minimum object size in pixels that should be drawn. All objects smaller than this size will be culled. For more information, see section “Small Object Culling” in Chapter 4.
culling.showStat
Enables the drawing of culling statistics. The following are the possible values:
| off | No statistics are drawn (the default). | |
| bbox | The bounding box for each geometry object is drawn in blue. | |
| stats | Cull percentage statistics are drawn for each screen (only for doubly buffered windows). | |
| all | Both bounding boxes and culling percentage statistics are drawn. |
culling.texCulling
Enables or disables texture culling. When texture culling is enabled, texture loads will be postponed until the texture is really viewable on each specified pipe. In that case only, the relevent part from the texture will be downloaded to the pipe. The resource OMP*culling should be turned on for this feature. For more information and current limitations of this feature, see the release notes.
dlSplit
Allows OpenGL Multipipe to split a display list into smaller display lists based on a geometry spatial sort to acheive better culling. The smaller display lists can be distributed among the rendering pipes. This feature is usually used when culling is turned on. The valid values for dlSplit are on and off; the default is off. For more information, see section “Display List Partitioning” in Chapter 4.
dlSplit.maxDepth
Limits the number of recursive subdivisions by the dlSplit algorithm, which is an adaptive subdivision algorithm. After the specified number of recursive subdivisions are made, the process will end even if it does not meet the dlSplit.maxTris criterion. The default value is 8.
dlSplit.maxTotalTris
Limits the number of triangles that will be considered by the dlSplit algorithm at each iteration. If a display list contains more triangles than the specified number, then the splitting algorithm will be applied multiple times, once for each group that contains the specified number of triangles. The default value is 400000.
dlSplit.maxTris
Limits the number of triangles to the specified maximum for each bounding box of subordinate display lists. Display lists that have fewer triangles (or other primitives) than the specified number will not be split by the dlSplit algorithm. The default value is 800.
dlSplit.showRandomColors
Allows OpenGL Multipipe to randomly assign a different color for each divided geometry partition. For testing and debugging purposes, this coloring allows you to better see the divisions made by the dlSplit algorithm. This may not work for all applications as it simply uses glColor() to set the color for each partition. The default is off.
drawPixelsClipping
Controls whether the glDrawPixels() operation will be clipped such that only the viewable rectangle of pixels will be sent to each pipe.
masterMode
Specifies if and how the master process needs to use one of the graphics pipes. The following are the valid values:
| render | The master process will render to the master local pipe and no slave draw process will be forked for this pipe. | |
| track | The master process will use its local pipe for state tracking only so that each glGet() call will be executed on the local pipe. | |
| off | The master will not use any physical pipe for either rendering or state tracking. Some OpenGL states are being tracked by the master in software while other states will be queried from one of the slaves when a glGet() call is being executed. |
masterScreen
Specifies which managed screen (pipe) will be used by the master application for either rendering or state tracking when running OpenGL Multipipe in master mode render or track (available only when using the omprun command). By default, it will be the first managed screen of the Xdmx or SGI Xinerama server.
maxFramesLatency
Specifies the maximum latency (in frames) allowed between the application and rendering slaves. The application process might pack a few frames ahead in the framebuffer while the slave processes are still drawing the previous frames. This introduces some latency between the application and the real drawing by the slave but helps overall throughput of master and slaves. The latency is always 0 when using masterMode render and is undefined if swapSyncMode is set to none. The default value for this resource is 4. For more information, see section “Frame Latency Control” in Chapter 4.
pbuffers.disable
Disables pbuffers support. When this resource is enabled, all pbuffer-capable framebuffer configurations will be filtered out and will not be exposed to the application. The default value is off.
pbuffers.layout
Controls how the rendering into a pbuffer is split among the rendering slaves. Each rendering slave can be configured to draw only to a sub-region of each pbuffer. The following are the valid values:
duplicate
All slaves renders to all regions of the pbuffer, That makes the content of the pbuffer to be duplicated on all rendering pipes. Use this configuration when your application uses glCopy*() to copy the pixels from the pbuffer to some other pixel buffer on the pipe. The other options might be better if you are using glReadPixels() to read back the pbuffer content into your process memory. This is the default value.
horizSplit
The area of the pbuffer is split into N horizontal strips, where N is the number of pipes. Each slave then limits the rendering to only one strip.
vertSplit
The area of the pbuffer is split into N vertical strips, where N is the number of pipes. Each slave then limits the rendering to only one strip.
rectSplit
The area of the pbuffer is split into N even rectangular areas as much as possible. For example, for a four-pipe configuration, it will be split into 2x2 tiles, where each tile is of size (w/2)x(h/2) and w and h are the pbuffer width and height, respectively. Each pipe then renders to only one tile.
shmQueueSize
Sets the size in bytes for the shared memory block that will be used for master-to-slaves communication. When this resource is not specified, the default value depends on the overall resolution of the meta display as determined by the following:
( DisplayWidth * DisplayHeight * 4 ) + 32
This allows a single full-screen glDrawPixels() command to fit in the shared memory since one single OpenGL command cannot be split into multiple packets. Depending on your application, you may want to set this value to be smaller or larger. When a shared memory size larger than the default or the specified size is needed, the application will exit with an error message specifiying the minimum shared memory size needed for that application.
slaveCPUs
Specifies the CPUs to assign to the draw slave processes for each of the active screens. If there are more active screens than the size of the specified CPU list, then the remaining draw processes will not be assigned to any particular CPU. By default, the draw processes will not be assigned to any particular CPU.
swapSyncMode
Specifies what method OpenGL Multipipe will use to synchronize swap buffers on all pipes. The following are the valid values:
| none | No swap synchronization is being performed. Each rendering slave runs freely. | |
| soft | Software synchronization is performed using a software barrier to force all slaves to issue the glXSwapBuffers() request at the same time. | |
| barrier | OpenGL Multipipe uses the hardware ImageSync or SwapReady line whenever possible (when no other application is using the hardware barrier). Otherwise, software synchronization will be used. | |
For more information on the synchronization of swap buffers, see section “Buffer Swap Synchronization” in Chapter 4. |
texShm
Controls the caching of textures in shared memory. When this switch is turned on, OpenGL Multipipe will cache a copy of each texture in shared memory that remains valid until the texture is used by all pipes. Once the texture has been downloaded to driver memory of all pipes, the shared memory cache is purged. This feature works together with texture culling (see the culling.texCulling resource). When culling.texCulling is turned on, the texShm resource is implicitly turned on. The default for the texShm resource is off.
viewportClippingMode
Specifies viewport clipping mode. Each rendering slave may limit the rendering region to only the portion of the window that is visible on its rendering pipe. This is required to support large viewport areas, which are allowed by a single pipe, and it also helps to scale fill rate performance. The viewportClippingMode resource selects the method OpenGL Multipipe uses to limit this rendering region. The following are the valid values:
| none | No viewport clipping is performed. Each hardware pipe clips the window to the pipe's boundary. | |
| scissor | OpenGL Multipipe uses glScissor() to limit the rendering to the viewing area only. | |
| viewport | OpenGL Multipipe defines a different viewport for each rendering slave. | |
| subwin | OpenGL Multipipe creates a separate child window for each rendering slave. The window size is the viewable region of the application window on the slave's pipe. This option is supported on DMX configurations only.When this resource is not specified, the default depends on the meta X server that is being used. For Xdmx the default is subwin. For Xsgi with SGI Xinerama enabled, the default is scissor. For more information, see section “Viewport Clipping” in Chapter 4. |
The OpenGL Multipipe environment is enabled if an X proxy layer is enabled (DMX or SGI Xinerama).
To verify that an X proxy layer is enabled, ensure that your DISPLAY environment variable is pointing to the correct display (usually :0.0 for SGI Xinerama or :1.0 for DMX) and enter the following commands in a command shell:
$ xdpyinfo | grep SGI-XINERAMA |
If SGI-XINERAMA appears as the result of the prior commands, SGI Xinerama is enabled.
$ xdpyinfo | grep DMX |
If DMX appears as the result of the prior commands, DMX is enabled.
| Note: If DMX-DRI appears as the result of the prior commands, not only is DMX enabled but the use of the omprun command will be optional as well. See section “Running Applications with OpenGL Multipipe”. |
To disable the OpenGL Multipipe environment, do the following:
To end a DMX session, simply log out.
You may also force the DMX server to exit by pressing Ctrl+Alt+q.
If you ran ompstartdmx from the command line, you will be returned to your regular X session after the session ends.
If you chose DMX as a login option or modified your .xsession file to start your DMX session, you will return to the login screen after the DMX session ends.
To permanently disable DMX from starting upon login, reverse the DMX-related changes you made to your .xession file or delete (or rename) your $HOME/.xsession file. On Linux systems, simply select another default login option.
If enabled, disable SGI Xinerama and restart the X server.
Enter the following to disable SGI Xinerama:
# chkconfig xinerama off |
Enter the following as root in an IRIX shell to restart the X server:
# (/usr/gfx/stopgfx; /usr/gfx/gfxinit; /usr/gfx/startgfx) & |
The X server has to be restarted for the chkconfig change to take effect.
Plain X applications will generally run under an X proxy layer without assistance. OpenGL (3D) applications need to use the OpenGL Multipipe 3D proxy library to handle 3D rendering correctly and efficiently on all screens.
To use the OpenGL Multipipe 3D proxy library with OpenGL applications, just run the program using the omprun script:
$ omprun app_name app_args |
This will preload the OpenGL Multipipe proxy libraries to intercept OpenGL calls.
The following is an example:
$ omprun ivview /usr/share/data/models/Banana.iv |
| Note: The use of the omprun script is optional on Oynx4 and Silicon Graphics Prism systems running the latest recommended operating system versions (IRIX 6.5.27 or later and SGI ProPack 3 Service Pack 4 or later, respectively). On these platforms, you can invoke the application in the normal fashion and the application will automatically utilize the full OpenGL Multipipe environment (master-slave 3D proxy layer) if the DMX proxy layer is detected. Later references to the use of the omprun script in this guide should be considered optional on these platforms, unless otherwise noted. On systems that do no meet these requirements, failure to use the omprun command under DMX will cause the application to use the slower GLX indirect rendering support in DMX to draw OpenGL to all screens. |
OpenGL Multipipe causes an OpenGL application to use the intermediate 3D proxy libraries instead of the normal OpenGL library. This enables the OpenGL application to behave correctly when its windows are moved across parts of the logical screen. Such an application is considered to be started in multipipe-unaware mode (or simply, unaware mode), since it is not aware of the underlying graphics hardware structure.
Technically, the omprun command sets the link editor environment variable (_RLDN32_LIST or _RLD64_LIST on IRIX and LD_PRELOAD on Linux) to use the libOMPmaster.so library of matching format prior to using the libGL.so library. When the omprun command is not used on systems where it is is optional, OpenGL Multipipe utilizes the X server's DRI extension, a mechanism in the libGL.so library, and a special SGIOMPdmx_dri.so module to intercept and route an application's OpenGL calls to the OpenGL Multipipe library libOMPmaster.so.
For more information on using omprun, see the omprun(1) man page or use the –help command-line option of omprun as follows:
$ omprun –help |
The following sections describe run-time options and how to best run different types of graphics applications:
For more information on running applications with OpenGL Multipipe, see the release notes, /usr/share/omp/release_notes/user/relnotes.html.
Even though the use of the omprun script is optional on Onyx4 and Silicon Graphics Prism platforms, you may want to use the command to invoke the application to set run-time options, some of which can override configuration options set otherwise. The configuration options are described in section “Setting up the OpenGL Multipipe Environment”.
Table 3-2 shows the run-time options for omprun along with the related configuration resources. For more information about the various options, see the omprun(1) man page or use the –help command-line option of omprun.
Table 3-2. omprun Command-Line Options
omprun Option | Configuration Resource | Description |
|---|---|---|
–cull | culling: on | Enable geometry culling. |
–cullshow | culling.showStat | Show culling information. |
–dlsplit | dlSplit: on | Enable display list spatialization. |
–dlsplitmaxtris | dlsplit.maxTris | Set the display list spatialization threshold. |
–dlsplitshow | dlsplit.showRandomColors: on | Show random colors. |
–dmxglx | N/A | Use GLX instead of master and slaves. |
–latency | maxFramesLatency | Set latency (how far ahead of the slaves the master works). |
–minpixels | culling.minPixels | Set the small object culling threshold. |
–mstrmode | masterMode | Set the master rendering mode. |
–nodlopen | N/A | Disable dlopen/dlsym overriding. |
–nosync | swapSyncMode: none | Disable all slave synchronization. |
–novpclip | viewportClippingMode: off | Disable viewport clipping. |
–pthread | N/A | Force the master to use the pthread API. |
–swapready | swapSyncMode: barrier | Use hardware swap barrier. |
OpenGL single-pipe applications are the targeted applications for OpenGL Multipipe. To run such applications, simply enable the OpenGL Multipipe environment and invoke the application using the omprun script.
Under SGI Xinerama, any OpenGL application started without the omprun script will not behave correctly. In that case, OpenGL drawings will appear only in the part of the window overlapping screen 0. On the other screens, the application will display a random image that corresponds to the current content of the framebuffer on that pipe.
Under DMX, OpenGL applications started without the omprun script will display correctly on all screens, using the GLX indirect rendering support in DMX. However, using the omprun script will provide better performance for OpenGL applications.
Hint: For an easy way to run a number of single-pipe OpenGL applications under OpenGL Multipipe without the need to always explicitly invoke omprun, start a command shell under omprun, as shown in the following :
$ omprun xwsh <omprun xwsh>$ app_name app_args |
Any application started from this new command shell will be started automatically in transparent multipipe mode.
As noted in Chapter 1, “OpenGL Multipipe Overview”, the X proxy layer enables pure X applications to run transparently over multiple pipes. To run pure X applications, simply enable SGI Xinerama or DMX before invoking them and they will run correctly. You do not need to use the omprun script for these applications.
On IRIX, there are applications that use the older IRIS GL graphics library instead of that of OpenGL. OpenGL Multipipe does not support IRIS GL. To check whether your current application is attempting to use IRIS GL, enter the following:
$ elfdump -Dl app_name | grep libgl.so |
The following is an example:
$ elfdump -Dl /usr/sbin/showcase | grep libgl.so [11] Jun 6 22:31:51 1996 0xe9155925 ----- libgl.so sgi1.0 |
The omprun script does this check and prevents OpenGL Multipipe from executing IRIS GL applications.
If your system supports IRIS GL, you can still run IRIS GL applications, but not using the OpenGL Multipipe omprun layer. Under SGI Xinerama, they will run correctly only on screen 0. Also, IRIS GL applications will run correctly in multipipe-aware mode, which is described in the subsequent section “Running Multipipe Applications in Multipipe-Aware Mode”.
Only when DMX is used as the X proxy layer, will IRIS GL applications run correctly on all screens without using the omprun script. This happens through the GLX indirect rendering support in DMX. Consequently, performance decreases.
On IRIX, there are applications that use the older o32 application binary interface (ABI) instead of the newer n32 or 64-bit ABIs. OpenGL Multipipe does not support applications that were built using the o32 ABI. To check whether your current application was built with the o32 ABI, enter the following:
$ file app_name | grep 32-bit |
If the text ELF 32-bit ... is printed as a result, it is an o32 application.
The following is an example:
$ file /usr/sbin/showcase | grep 32-bit /usr/sbin/showcase: ELF 32-bit MSB mips-2 dynamic executable MIPS - version 1 |
The omprun script does this check and prevents OpenGL Multipipe from executing o32 applications.
If your system supports the o32 ABI, you can still run o32 applications, but not using the OpenGL Multipipe omprun layer. Under SGI Xinerama, they will run correctly only on screen 0. Also, o32 applications will run correctly in multipipe-aware mode, which is described in the subsequent section “Running Multipipe Applications in Multipipe-Aware Mode”.
Only when you use DMX as the X proxy layer, will o32 applications run correctly on all screens without using the omprun script. This happens through the GLX indirect rendering support in DMX. Consequently, performance decreases.
Multipipe applications are intentionally written to take advantage of systems that have multiple graphics pipes. If they know about the underlying graphics hardware, they can explicitly address and take advantage of the individual graphics pipes. Typically, multipipe applications are written using OpenGL Performer or OpenGL Multipipe SDK.
It is best not to run such applications under OpenGL Multipipe, which hides the hardware configuration of the system from the applications. To run at full potential, these applications should be aware of the different graphics pipes in the system. To allow such applications to see the real graphics hardware does not require you to disable OpenGL Multipipe.
The OpenGL Multipipe layer may be bypassed on a per-application basis. This allows a multipipe application to be fully aware of the multipipe environment while other applications, aware of only a single large pipe, continue to run under OpenGL Multipipe. Applications that bypass the OpenGL Multipipe layer are said to run in multipipe-aware mode (or simply, aware mode), because they are aware of the different graphics pipes handled by the X server.
To run a multipipe application in aware mode while other single-pipe applications run concurrently in unaware mode, set the DISPLAY environment variable to point to the desired backend display that is managed by the X proxy layer (for example, :0.1), and then start the multipipe application with the –aware command-line option of the omprun script, as in the following example:
$ setenv DISPLAY :0.0 $ omprun -aware perfly |
Under DMX, it is especially important to set the DISPLAY environment variable because the DMX meta display has a completely different display name than its component backend displays. By default, the DMX display is :1 and the backend aware display is :0. In the case of SGI Xinerama, the SGI Xinerama meta display and its component backend displays are referred to by the same display name (for example, :0).
| Note: Under SGI Xinerama, applications started in aware mode will be under window manager control only with omp4Dwm. Under DMX, other window managers may be used. See the subsequent section “Managing Windows for Aware Applications” for more information about aware window management. |
Hint: For an easy way to run a number of commands in aware mode, start a command shell in aware mode.
$ setenv DISPLAY :0.0 $ omprun -aware xwsh <aware xwsh>$ app_name app_args |
Any application started from this new command shell will be started automatically in aware mode.
You may configure SGI Scalable Graphics Compositor hardware for use with OpenGL Multipipe to improve geometry and fill performance for an application. This requires no changes to the application. Using the following topics, this section describes how to configure SGI Xinerama or DMX for this purpose as well as settings for OpenGL Multipipe to improve performance and usability in composited logical screen mode:
Composited screens are a special case of overlapped screens in which each compositor input screen completely overlaps the other compositor input screens. That is, each compositor input pipelet displays the same area of the logical screen.
To configure totally overlapped pipes, specify negative xoffset and yoffset parameters that equal the width (and height) of the screens you are overlapping. For example, if you have four pipelets, each with a resolution of 1280 x 1024, connected to a single compositor, you would place the following –hw arguments together on one line in the /var/X11/xdm/Xservers file:
:0 secure /usr/bin/X11/X -boards 4,5,6,7 -hw board=4,right=1 -hw board=5,left=0,right=2,xoffset=-1280 -hw board=6,left=1,right=3,xoffset=-1280 -hw board=7,left=2,xoffset=-1280 ... other X server arguments ... |
Notes:
The –boards numbers are physical pipe numbers, but the indexes given to the right, left, above, and below parameters refer to the logical order of the –hw parameters.
The lines are separated in the example only for readability.
To configure completely overlapped screens under DMX, simply create a DMX configuration file to manage the screens of the backend X server in the desired order. Do not specify an offset or a 0x0 offset after the screen specifications. The following is an example configuration file:
virtual totaloverlap 1280x1024 {
display :0.0 1280x1024;
display :0.1 1280x1024;
display :0.2 1280x1024 @0x0; # “@0x0” is optional
display :0.3 1280x1024;
}
|
For more information on DMX configuration files, see section “Creating DMX Configuration Files”.
You can specify a static tiling mode for a hardware compositor during DMX startup. The ompstartdmx script will start both the hardware compositor and DMX with the specified tiling mode.
The –compositor option on the ompstartdmx script allows you to specify the desired static tiling mode, as shown in the following example:
$ ompstartdmx -compositor mode |
The following values are available for mode:
| Mode | Description | |
| quad | A quad tiling | |
| vert2 | Two vertical stripes | |
| vert3 | Three vertical stripes | |
| vert4 | Four vertical stripes | |
| horiz2 | Two horizontal stripes | |
| horiz3 | Three horizontal stripes | |
| horiz4 | Four horizontal stripes |
You can also set up the video format using the –compositor option, as shown in the following entry:
$ ompstartdmx -compositor quad,1280x1024_75 |
The video format must be supported by both the hardware compositor and the pipes, and all pipes must have the same video format. Otherwise, ompstartdmx exits with an error. The default video format is the current one for the pipes.
You can set up the hardware compositor for pixel averaging during DMX startup. In pixel averaging mode, the following occurs:
OpenGL Multipipe applies a different sub-pixel jittering offset for each pipe's frustum.
The hardware compositor averages the pixel values.
The resulting image on the compositor output is antialiased.
The hardware compositor can be configured for pixel averaging mode with either two or four input pipes. For proper operation, configure all pipes connected to the compositor to be fully overlapped.
| Note: When using two pipes, connect them to compositor channels 0 and 2, not 0 and 1. |
If you are starting a session with only one compositor attached, then the simplest way to use pixel averaging is to use the -compositor option on the ompstartdmx command, as follows:
$ ompstartdmx -compositor {aa2 | aa4}
|
This command entry sets up a DMX configuration file with full overlap for two or four pipes and configures the compositor and OpenGL Multipipe for pixel averaging.
If you are using more than one compositor or you are use your own DMX configuration file, you must use a compositor configuration file, described in the “Using Multiple Compositors” section in the release notes.
You can configure the jittering offset values per application using the following X resources:
OMP*aa2Jitter.X and OMP*aa2Jitter.Y (for two-pipe pixel averaging)
OMP*aa4jitter.X and OMP*aa4Jitter.Y (for four-pipe pixel averaging)
For more information on the resources, see section “Resource Descriptions”.
OpenGL Multipipe allows you to configure multiple compositors by specifing a special compositor configuration file with the -compositor option for the ompstartdmx command, as shown in the following:
$ ompstartdmx -compositor config-file |
The compositor configuration file config-file describes the desired mode of operation for each compositor in the session. The format and use of the configuration file is described in the “Using Multiple Compositors” section in the release notes.
To establish static composited regions, do the following:
Set up fully overlapping screens with SGI Xinerama or DMX.
The sections “Configuring Composited Screens with SGI Xinerama” and “Configuring Composited Screens with DMX” describe how you do this.
Configure the SGI Scalable Graphics Compositor hardware and OpenGL Multipipe to constrain drawing to areas of the physical pipes that will provide the best static load balancing for your application with sgcombine (on IRIX) or sgcmb (on Linux).
Note that sgcombine must be run in multipipe-aware mode:
$ env DISPLAY=:0.0 omprun -aware /usr/gfx/sgcombine |
For more information about setting up composited screens with sgcombine or sgcmb, see the SGI Scalable Graphics Compositor User's Guide.
Configure OpenGL Multipipe to match the static compositor configuration set with sgcombine.
For example, if you specify a compositor tiling of four input rectangles of 640x512 pixels in sgcombine, setting the environment variable SGIOMP_SCREEN_RECTS to the following string provides the matching settings to OpenGL Multipipe:
“640x512+0+0 640x512+640+0 640x512+0+512 640x512+640+512” |
OpenGL Multipipe will then clip drawing to these subregions on back-end screens :0.0, :0.1, :0.2, and :0.3 (pipes 4, 5, 6, and 7), respectively, if DMX or SGI Xinerama are configured as in the previous sections. The rectangles are specified in pipe-relative coordinates, one per backend X screen, using the format described in the XParseGeometry(3X11) man page. Extra rectangles are ignored and screens for which a rectangle is not specified will have clipping performed at the screen borders.
Enabling the omprun –cull option will cause geometry to be culled to these areas as well.
When an X proxy layer is used to overlap screen regions on an edge-blended display or a compositor-based system, the cursor will seem to disappear when it enters the overlapped or uncomposited regions of the display. In X, a mouse belongs to one screen of the X server at a time. Therefore, it is normally not possible to draw the mouse multiple times (on different screens) in the overlap region.
To prevent the cursor from disappearing in these cases, you need to create additional or duplicate cursor images (not real cursors) where two or more screens overlap. There is still just one real cursor position on the display. The way you do this depends on your X proxy layer, SGI Xinerama or DMX.
In IRIX 6.5.20 or later, you enable duplicate cursors by adding the –phantomcursors flag to the X server command line in the /var/X11/xdm/Xservers file. For more information about the –phantomcursors option, see the Xsgi(1) man page.
There are two ways to enable duplicate cursors under DMX:
Managing an appropriate subarea of each composited input pipe instead of the whole screen area
Managing multiple backend X servers
Managing Screen Subregions with DMX
You can use a DMX configuration file to cause DMX to manage less than a whole backend screen. When the subregions of each screen are visually assembled using a congruent static compositor tiling, the resulting logical screen will look and behave identically to the DMX or SGI Xinerama displays with fully overlapping screens described previously. The following configuration file entry illustrates this feature:
virtual quadtilesubregions 1280x1024 {
display :0.0 640x512+0+0 @0x0;
display :0.1 640x512+640+0 @640x0;
display :0.2 640x512+0+512 @0x512;
display :0.3 640x512+640+512 @640x512;
}
|
| Note: The SGIOMP_SCREEN_RECTS environment variable, described in section “Specifying Static Composited Regions for Fully Overlapped Screens”, is not necessary here and should not be used with a DMX configuration that manages screen subregions. |
Managing Multiple Backend X Servers with DMX
The X mouse cursor can be made visible in the partially or fully overlapped screen regions needed for edge-blended or composited displays. As long as the logically overlapping areas of the DMX display are composed by screens of different backend X servers, DMX can utilize the mouse cursor that is available on each backend X server.
Instead of having DMX manage multiple screens of a single backend X server, you can start multiple backend X servers and specify a DMX configuration that logically overlaps areas from different backend X servers, as shown in the following:
virtual totaloverlapmulti 1280x1024 {
display :0.0 1280x1024;
display :1.0 1280x1024;
display :2.0 1280x1024;
display :3.0 1280x1024;
}
|
| Note: The multiserver technique can be combined with the technique of managing screen subregions to create a logical display on which mouse cursors are visible in all overlapped and composited regions. |
To allow window manager support for applications started in aware mode, OpenGL Multipipe provides aware window management. Under SGI Xinerama, the window manager omp4Dwm, a specialized version of the SGI standard window manager (4Dwm), is used to manage aware windows. Under DMX, a window manager wrapper is provided that is much like omprun for GL applications.
When omp4Dwm or the window manager wrapper is not used, applications started in aware mode (using omprun –aware app_name) will bypass the window manager. This means that their windows cannot be moved, resized, iconified, or otherwise managed. This includes the regular decoration provided by the window manager. The windows will not have this decoration. This occurs because an unaware window manager does not know about all of the real screens that the X proxy layer is managing. It cannot manage aware windows that were not created through X proxy layer.
If you are using DMX as your X proxy layer and you invoke ompstartdmx with the standard arguments (or if DMX is configured to start automatically when you log in), a window manager of your choice will be automatically started with the window manager wrapper so that it is able to manage aware windows. You can change the DMX default window manger by using the ompstartdmx –wm option. You may follow the steps in the following subsections if you want to run a different window manager to manage aware windows.
This section describes the following topics:
“Setting an Aware Window Manager as the Default”
| Note: The multipipe-aware window manager is currently not supported for compositor-based systems. |
To start an aware window manager, perform the following steps:
Exit or kill any unaware window manager that is currently managing the display.
If you are using 4Dwm (the default window manager on IRIX), enter the following in a command shell:
$ tellwm quit |
Otherwise, if possible, exit your window manager without logging out. One way to do this is to find the process number for your window manager and kill it manually, as the following illustrates:
$ ps -e | grep my_window_manager 23878 ? 0:42 my_window_manager $ kill 23878 |
Some window managers may not allow you to exit the window manager and remain logged in. If this is the case, you will need to start the aware window manager from a .xsession file. See the section “Setting an Aware Window Manager as the Default” for more information.
Start the specialized window manager.
Under SGI Xinerama, enter the following:
$ start_ompwm |
Under DMX, enter the following:
$ ompwrapwm twm |
The start_ompwm script starts omp4Dwm after first checking if the display server supports SGI Xinerama. The ompwrapwm script starts the window manager twm in aware window management mode under DMX. If the display server is determined to be compatible, the script starts the window manager with aware window management support enabled. If the display server is not compatible, the script will exit. The script can be made to start the window manager in unaware mode (with aware window management disabled) as a contingency.
For more information on using the start_ompwm and ompwrapwm scripts, see their man pages or use the -help command-line option of the scripts as follows:
$ start_ompwm -help |
or
$ ompwrapwm -help |
Notes:
You can use any window manager with the ompwrapwm script or with the ompstartdmx –wm option on IRIX. Only 4Dwm and twm are supported on IRIX. GNOME is recommended on Linux platforms.
Starting an application in aware mode and then starting the window manager will result in the application's windows being unmanaged by the aware window manager. An aware window manager must be started prior to running an application in aware mode in order for its windows to be managed.
To exit an aware window manager, simply log out and log back in. The default window manager will again manage your display.
If you are running omp4Dwm under SGI Xinerama, you may also exit omp4Dwm by entering the following:
$ tellwm quit |
Then start your original window manager.
An alternate way to run an aware window manager is to invoke the start_ompwm or ompwrapwm my_window_mgr script in your $HOME/.xsession file. Which script should be invoked (start_ompwm or ompwrapwm) depends respectively on whether SGI Xinerama or DMX is running.
For IRIX users, the directory /usr/share/omp/examples/X11/ contains some example .xsession files . For more information about .xsession files, see the man pages X(1) and xdm(1).
For Linux users, you must set up a default aware window manager under DMX. See section “Initializing DMX”.