Driving Multiple Systems |
Selecting Voodoo Graphics Units
At any given moment, only a single Voodoo Graphics subsystem is active.
The grSstSelect(), presented above, activates a specific unit.
All Glide functions, with the exception of the grGlide family and
grSstSelect(),
operate on only the currently active Voodoo Graphics subsystem. Note that
the global Glide state is bound to each Voodoo Graphics independently.
So, to set the constant color in each Voodoo Graphics unit to the same
value, for example, you must write a loop that selects each one in turn
and sets the color, as shown in .
Example 3.2 Setting a state variable in all Voodoo Graphics subsystems.
Each Voodoo Graphics subsystem has its own version of the Glide state variables, including a constant color value that will be used to clear the screen. The constant color is zero by default. The code fragment below cycles through all the Voodoo Graphics units found by a previous call to grSstQueryHardware(), setting the constant color to black.
GrHwConfiguration hwconfig;
for ( i = 0; i < hwconfig.num_sst; i++ )
|
Opening Multiple Voodoo Graphics UnitsgrSstWinOpen() must be called once for each Voodoo Graphics subsystem that will be used. Note that two Voodoo Graphics subsystems linked together in a scan-line interleaving configuration are treated in software as a single Voodoo Graphics subsystem.
Scan-line Interleaved Voodoo Graphics Units
Two Voodoo Graphics subsystems can be wired together in a configuration known as scan-line interleaving, which effectively doubles rasterization performance.
From an applications perspective, two Voodoo Graphics subsystems in a scan-line interleaved configuration are treated as if a single Voodoo Graphics subsystem is installed in the system, including during :
- Voodoo Graphics selection,
- initialization,
- state management,
- texture download, etc.