DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Terminology for graphics driver writers

alu

alu is the raster bit operation defined in graphics drivers to be applied when mixing the image with the contents of the frame buffer. The default X values are defined in the ../X11/X.h file:

   #define GXclear                 0x0             /* 0 */
   #define GXand                   0x1             /* src AND dst */
   #define GXandReverse            0x2             /* src AND NOT dst */
   #define GXcopy                  0x3             /* src */
   #define GXandInverted           0x4             /* NOT src AND dst */
   #define GXnoop                  0x5             /* dst */
   #define GXxor                   0x6             /* src XOR dst */
   #define GXor                    0x7             /* src OR dst */
   #define GXnor                   0x8             /* NOT src AND NOT dst */
   #define GXequiv                 0x9             /* NOT src XOR dst */
   #define GXinvert                0xa             /* NOT dst */
   #define GXorReverse             0xb             /* src OR NOT dst */
   #define GXcopyInverted          0xc             /* NOT src */
   #define GXorInverted            0xd             /* NOT src OR dst */
   #define GXnand                  0xe             /* NOT src OR NOT dst */
   #define GXset                   0xf             /* 1 */
Most graphics chips support different alu values than those in the default. In this case, you should set up a static table of size 16 that takes the alu value as an index and returns the actual value used by the hardware.

These operations need to be mapped to the card's operations. The most important ones are GXcopy, GXxor, and GXinvert. For an example of how to do this, see the nte sample code for the DrawImage( ) routines.


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