Table of Contents Glide Programming Guide



Download 6.22 Mb.
Page16/106
Date03.02.2023
Size6.22 Mb.
#60547
1   ...   12   13   14   15   16   17   18   19   ...   106
GLIDEPGM
grSstQueryHardware() returns a Boolean value: FXTRUE indicates that at least one Voodoo Graphics subsystem was found. The argument, hwConfig, is a pointer to a structure that will be filled in with information about the number and configurations of the Voodoo Graphics subsystems it found.
Note that when two Voodoo Graphics subsystems are configured as a single scanline-interleaved system, they are viewed by Glide and an application as a single subsystem.
The first initialization function, grGlideInit(), sets up the Glide library and thus must be called before any other Glide functions are executed. It allocates memory, sets up pointers, and initializes library variables and counters. There are no arguments, and no value is returned.
void grGlideInit( void )

The next function called to initialize the system is grSstSelect(), which makes a specific Voodoo Graphics subsystem “current”. It must be called after grSstQueryHardware() and grGlideInit() but before grSstWinOpen().


void grSstSelect( int whichSST )

The argument is the ordinal number of the subsystem that will be made active and must be in the range [0..hwconfig.num_sst] where hwConfig is the structure that holds the system configuration information returned by the preceding call to grSstQueryHardware(). If whichSST is outside the proper range of values and the debugging version of Glide is used, a run-time error will be generated. If the release version of Glide is loaded, use of an inappropriate value for whichSST will result in undefined behavior.


The final initialization function, grSstWinOpen(), initializes the currently active Voodoo Graphics subsystem, specified by the most recent call to grSstSelect(), to the default state. All hardware special effects (depth buffering, fog, chroma-key, alpha blending, alpha testing, etc.) are disabled. All global state constants (the chroma-key reference value, the alpha test reference, the constant depth value, the constant alpha value, the constant color value, etc.) and pixel rendering statistic counters are initialized to 0.
grSstWinOpen() should be called once per installed Voodoo Graphics subsystem (note that scanline interleaved subsystems are treated as a single Voodoo Graphics subsystem) and must be executed after grGlideInit(), grSstQueryHardware() and grSstSelect(). It returns FXTRUE if the initialization was successful and FXFALSE otherwise.
FxBool grSstWinOpen( FxU32 hwnd,
GrScreenResolution_t res,
GrScreenRefresh_t refresh,
GrColorFormat_t cFormat,
GrOriginLocation_t locateOrigin,
int numBuffers,
int numAuxBuffers

Download 6.22 Mb.

Share with your friends:
1   ...   12   13   14   15   16   17   18   19   ...   106




The database is protected by copyright ©ininet.org 2024
send message

    Main page