Implement basic operations
The procedures described in this topic enable you to:
-
complete the basic server and increase performance
-
customize the routines that draw a rectangle to the screen
-
read an image from the screen
-
set the colormap
-
blank the screen
-
take advantage of any accelerated
routines supplied by your graphics adapter
-
Implement the driver's
DrawImage(D3nfb)
routines.
Note that there are different functions
to support depths 1, 2, 4, 8, and 16;
these routines are coded in the following driver
files:
xxxData.c
xxxImage.c
On SVR5 and SCO OpenServer 5 systems,
examples of these routines can be seen in the
sample nte driver.
See
/usr/xlink/Xserver/hw/sco/ports/nte/nte8/nteData.c
/usr/xlink/Xserver/hw/sco/ports/nte/nte8/nteImage.c
for more information.
-
Implement the driver's
ReadImage(D3nfb)
routines to read an area from the screen.
On SVR5 and SCO OpenServer 5 systems,
examples of these routines are provided in the
the following nte files.
/usr/xlink/Xserver/hw/sco/ports/nte/nte8/nteData.c
/usr/xlink/Xserver/hw/sco/ports/nte/nte8/nteImage.c
-
Implement the driver's
SetColor(D3nfb)
routine in the xxxCmap.c file
to set the colormap.
See
``Modify the colormap (SetColor)''.
-
Implement the driver's
BlankScreen(D3nfb)
routine.
Most adapter hardware can handle this operation,
but if yours cannot, the functionality can be implemented
by setting all entries in the colormap to black.
-
Recompile and link the driver; see
``Compile driver template''.
At least one depth must be in place before the
X server can run. Start with depth 8 (256 colors).
Add the other depths later.
It is advisable not to start writing the X driver
until you have appropriate knowledge and documentation
to achieve all these tasks.
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005