.if n .pH port.chap05 @(#)chap05	40.4
.\" Porting manual:  Ch. 5 Porting Shapes
.\" Ps = POSTSCRIPT
.\" Sd = NeWS
.\" Cs = CSCRIPT
.ds Ps P\s-2OST\s+2S\s-2CRIPT\s+2
.ds Sd \s-2X11/Ne\h'-0.2n'WS\s+2
.ds Cs \CS\s-2CRIPT\s+2
.ds At "AT&T SVR4.0
.BK "Porting the X11/NeWS Server"
.CH "The Graphics Device Interface (Shapes)"  5
.H 1 "The Graphics Device Interface (Shapes)"  
.H 2 "Introduction"
This chapter provides a brief overview to the procedure for 
porting the \*(Sd graphics
subsystem to a new software/hardware platform.  For detailed 
information on porting Shapes refer to the following documents:
.BL
.LI
.I "Shapes Reference Manual"
.\" (Part Number: 800-3705-10)
.LI
.I "Shapes Internal Architecture"
.\" (Part Number 800-3706-10)
.LI
.I "Shapes Porting Guide"
.\" (Part Number 800-3201-10)
.LE
.H 2 "What is Shapes?"
The interface between the \*(Sd server and the graphics hardware is
called Shapes.  The supplied version of \*(Sd supports both monochrome 
(1 bit) and color (4, 8 or 32 bit) framebuffers.
1 bit support should be easily portable to framebuffers that
can be addressed as a linear block of memory. This includes
the Cornerstone 1600x1200 display, EGA/VGA video
adaptors in monochrome mode, and the Sun monochrome (BW2 low and
high resolution) framebuffers.
.P
Supported color displays include the EGA/VGA (4 bit color) and
Sun's Color graphics cards (8 and 32 bit color).
.P
In addition to ``dumb'' (memory addressable) framebuffers, the Shapes
graphics interface allows the developer to support
hardware graphics accelerators and other custom graphics interfaces.

.H 2 "Organization of Shapes Code"
The Shapes code is organized under the 
.UI ~/usr.bin/xnews/xnews/graphics 
directory as follows:

.SS
.ft4
include      - All "installed" include files
 include/di  - Internal include files
 include/cg2 - (SUN) CG2 (8 bit w/ROP hardware)
 include/cg5 - (SUN) CG5 (8 bit, double buffered)
 include/mem - All memory depth include files
di           - Framebuffer independent code
dd           - Framebuffer dependent code
 dd/cg2      - (SUN) CG2 framebuffer source
 dd/cg5      - (SUN) CG5 framebuffer source
 dd/vga      - 16 bit color EGA/VGA
 dd/mvga     - Monochrome EGA/VGA
 dd/mem      - Generic memory (all depths) rasters
 dd/mem1     - Generic memory 1 bit depth code
 dd/mem8     - Generic memory 8 bit depth code
 dd/mem32    - Generic memory 32 bit depth code
lib          - where libraries are installed
.ft1
.SE



