InitGDevice
short gdrefNum ; Reference number of specific video device driver
long mode ; Device's configuration ( color, mono, color table)
GDHandle gdh ; Handle to gDevice parameter
InitGDevice sets the graphics device to the specified mode and fills out the gDevice record with all the information that describes that particular mode.
gd refNum is the reference number of the specified video device driver.
mode describes the monitor's capabilities as determined by the video
card.
gdh is a handle to the gDevice record structure and is allocated by a
Notes: A device's capabilities are determined by the mode and the mode setting is
chosen from a list of possibilities contained in the video card's ROM. The
drivers work together.
The video ROM contains most of the basic information on mode characteristics,
unless the monitor has a variable color table. In that case, the 'clut' resource (ID = depth) is used to provide the default color table.
Applications rarely call InitGDevice. Video devices are initialized at system startup and the user changes modes from the control panel. However, if your
program initializes the device's color table, it also has to call MakeITable to build the inverse table for the device. Also, this call is non- functional if your
program initializes a device without a driver. In that case, your program has to
initialize all of the gDevice's fields.