DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Writing NFB graphical adapter drivers

Replace Window Private operations

The first set of routines to work on are those called through the nfbWinOps(D4nfb) structure. All of these routines must apply alu and planemask. If your hardware cannot do this, it is unlikely that you will gain much by implementing these NFB capabilities.

The sample routines in the gen directory implement all of these routines with ReadImage(D3nfb) and DrawImage(D3nfb). By copying and modifying these routines, you can take better advantage of the hardware capabilities.

The routines to modify are:

Sample Routine Note
CopyRect(D3nfb) copy rectangles
DrawSolidRects(D3nfb) implement fast fills
DrawImage(D3nfb) already written
DrawMonoImage(D3nfb) used for most text operations. Chips that can do color expansion of mono images give excellent performance for this routine.
DrawOpaqueMonoImage(D3nfb) same as DrawMonoImage( ) except that the background must be drawn as well. One trick is to essentially execute DrawMonoImage( ) twice: once for the foreground and then again for the background.
ReadImage(D3nfb) no need to worry about planemask
DrawPoints(D3nfb) draw a list of points
TileRects(D3nfb) draws a list of rectangles, filling the rectangles with the specified tile. Doing these operations in hardware will help your xbench results.
ValidateWindowGC(D3nfb) examines the window graphics context and the drawable and adjusts the context (or other device dependent) resources to ensure that future graphics operations that include a GC and drawable will function correctly.

For more information about each of these routines, see the appropriate manual pages and the sample code.


© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005