Copyright © 1984 by Xerox Corporation. All rights reserved.
Last Edited by: Crow, August 9, 1989 3:04:40 pm PDT
Glassner, March 14, 1989 2:18:44 pm PST
DIRECTORY G3dRender, ImagerSample, Rope;
Types
Context: TYPE ~ G3dRender.Context;
ContextProc: TYPE ~ G3dRender.ContextProc;
ImagerProc: TYPE ~ G3dRender.ImagerProc;
Pair: TYPE ~ G3dRender.Pair;
PairSequence: TYPE ~ G3dRender.PairSequence;
Patch: TYPE ~ G3dRender.Patch;
PatchProc: TYPE ~ G3dRender.PatchProc;
Pixel: TYPE ~ G3dRender.Pixel;
Quad: TYPE ~ G3dRender.Quad;
RealSequence: TYPE ~ G3dRender.RealSequence;
RGB: TYPE ~ G3dRender.RGB;
RopeProc: TYPE ~ G3dRender.RopeProc;
RenderData: TYPE ~ G3dRender.RenderData;
ShadingClass: TYPE ~ G3dRender.ShadingClass;
SpotProc: TYPE ~ G3dRender.SpotProc;
Triple: TYPE ~ G3dRender.Triple;
RasterSampleMaps: TYPE ~ ARRAY [0..5) OF ImagerSample.RasterSampleMap;
RopeDesc: TYPE ~ RECORD [rope: ROPE, pos: Pair, color: Pixel, size: REAL, font: ROPE];
LerpVtx:
TYPE ~
RECORD [
x, y: REAL,
val: RealSequence
];
LerpVtxSequence:
TYPE ~
RECORD [
length: CARDINAL,
element: SEQUENCE maxLength: CARDINAL OF REF LerpVtx
];
FancyPatch:
TYPE ~
RECORD [
recurseLevel: NAT ← 0,
renderData: REF RenderData, -- procs for texturing, etc.
ctlPt: SEQUENCE length: CARDINAL OF LerpVtx
];
Initializing and Updating Pixel Maps
AllocatePixelMemory: ContextProc;
Get pixel memory for things like rgb, alpha, depth, normal coding.
Get a bare context for making images independent of color display.
DepthBuffering:
PROC [context: Context, on:
BOOL ←
TRUE ];
Sets up or destroys depth buffer in VM for context.pixels.
AntiAliasing:
PROC [context: Context, on:
BOOL ←
TRUE ];
Sets up or destroys alpha buffer in VM for context.pixels (used for antialiasing).
NormalBuffering:
PROC [context: Context, on:
BOOL ←
TRUE ];
Sets up or destroys normal vector buffer in VM for context.pixels (used for LightingTool)
.
FillInBackGround: ContextProc;
Loads background behind current image.
FillInConstantBackGround:
PROC [context: Context, bkgrdClr:
RGB, cvrge:
BYTE ← 255];
Clears frame, use with alpha buffer to load background color behind shapes.
Low-level drawing
ShadeSpot: SpotProc;
Send spot values through the vertex shading procedure.
Draw2DLine:
PROC [context: Context, p1, p2: Pair, color: Pixel];
Draw a line with integer endpoints.
Draw2DPoly:
PROC [context: Context, poly: PairSequence, color: Pixel]
;
Draw polygon avoiding floating point.
DrawRope: RopeProc;
Put a rope in the pixels, somehow.
DoRope: ImagerProc;
Put a rope in the pixels, using calls on the imager, rope is passed as RopeDesc in data.
Fancy Polygon Tilers
FancyTiler:
PROC [context: Context, poly:
REF Patch];
Recursive implementor of tiler. For Anti-aliasing, texture, etc.
RealFancyTiler:
PROC [context: Context, poly:
REF FancyPatch];
We're goin' blow the socks off this baby!