Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ intro(3g) — GL2 W2.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Introduction()  —  Silicon Graphics Beta Release

INTRODUCTION

The IRIS Reference Manual contains descriptions of the commands in the Graphics Library. 

Each description defines the number, order, and types of the arguments to each command.  C, FORTRAN, and Pascal descriptions are provided under the heading SPECIFICATION.  A description of the command, including function, side effects, and potential errors is given in the section called DESCRIPTION; related commands are listed under SEE ALSO. 

Some of the commands come in several versions, depending on the number and type of the arguments.  Coordinate data can be 2D or 3D, and can be floating-point numbers, integers, or short (16-bit) integers.  The default is 3D floating-point data.  Integer data and 2D points are specified with suffixes: "i" for integer, "s" for short, and "2" for 2D. 

An icon appears on each page to indicate whether the command can be compiled into a display list:

These commands can be used in
immediate mode or compiled
into a display list.
These commands can be used
only in immediate mode.

TEXT STRINGS

C and Pascal text strings are terminated with a null character (ASCII 0); FORTRAN has a character data type that includes the length of the string. 

POINTERS

Many of the Graphics Library commands return several values to the caller.  The arguments to these commands are pointers, or addresses of memory locations.  In C, they are declared as pointer variables by prefixing the variable name with an asterisk in the declaration.  FORTRAN passes all parameters by reference, so no special declaration is necessary.  Pascal uses the var keyword to distinguish between value parameters and pointer arguments. 

PASCAL ARRAYS

Pascal normally copies all arguments to a subroutine, including arrays.  In the interest of efficiency, we have declared all array arguments to be reference parameters: an address to the data will be passed to the subroutine, rather than the data itself. 

BOOLEANS

Many of the commands have boolean arguments or return boolean values.  These are declared as type Boolean in C and Pascal, and as logical or integer in FORTRAN.  We assume that FALSE is zero, and that TRUE is anything except FALSE. 

TYPE DECLARATIONS

We have constructed type declarations for C and Pascal wherever they add to the readability of the code.  Here are the type definitions:

C
#define FALSE 0
#define TRUE !FALSE
#define PATTERN_16 16
#define PATTERN_32 32
#define PATTERN_64 64
#define PATTERN_16_SIZE 16
#define PATTERN_32_SIZE 64
#define PATTERN_64_SIZE 256
typedef unsigned char Byte;
typedef long Boolean;
typedef short Angle;
typedef short Scoord;
typedef short Screencoord;
typedef long Icoord;
typedef float Coord;
typedef char *String;
typedef float Matrix[4][4];
typedef unsigned short Device;
typedef unsigned short Colorindex;
typedef unsigned char RGBvalue;
typedef unsigned short Linestyle;
typedef unsigned short Cursor[16];
typedef struct {
unsigned short offset; /* 2 bytes */
Byte w,h;/* 2 bytes */
char xoff,yoff;/* 2 bytes */
short width;/* 2 bytes */
} Fontchar;
typedef long Object;
typedef long Tag;
typedef unsigned short Pattern16[PATTERN_16_SIZE];
typedef unsigned short Pattern32[PATTERN_32_SIZE];
typedef unsigned short Pattern64[PATTERN_64_SIZE];

Pascal
constMAXARRAY = 1023;
MAXRASTER = 4095;
MAXOBJECTS = 4095;
PATTERN_16 = 16;
PATTERN_32 = 32;
PATTERN_64 = 64;
PATTERN_16_SIZE = 16;
PATTERN_32_SIZE = 64;
PATTERN_64_SIZE = 256;
typeByte = 0..255;
Short = integer;
UnsignedShort = 0..65535;
Angle = integer;
Screencoord = short;
Icoord = longint;
Coord = real;
Scoord = UnsignedShort;
Strng = packed array [1..128] of char;
Matrix = array [0..3, 0..3] of real;
Device = UnsignedShort;
string128 = string [128];
pstring = ^Strng;
pshort = ^Short;
ppshort = ^pshort;
Colorindex = UnsignedShort;
RGBvalue = Byte;
Linestyle = UnsignedShort;
Pattern = array [0..15] of Byte;
Pattern16 = [0..PATTERN_16-SIZE] of UnsignedShort;
Pattern32 = [0..PATTERN_32_SIZE] of UnsignedShort;
Pattern64 = [0..PATTERN_64-SIZE] of UnsignedShort;
Cursor = array [0..15] of UnsignedShort;
Fontchar = record
offst: Short;
w, h: Byte;
xoff, yoff: -128..127;
width: Short;
end;
Object = longint;
Tag = longint;
Coord4array = array [0..MAXARRAY, 0..3] of Coord;
Coord3array = array [0..MAXARRAY, 0..2] of Coord;
Coord2array = array [0..MAXARRAY, 0..1] of Coord;
Icoord3array = array [0..MAXARRAY, 0..2] of Icoord;
Icoord2array = array [0..MAXARRAY, 0..1] of Icoord;
Scoord3array = array [0..MAXARRAY, 0..2] of Scoord;
Scoord2array = array [0..MAXARRAY, 0..1] of Scoord;
Screenarray = array [0..MAXARRAY, 0..2] of Screencoord;
Boolarray = array [0..MAXARRAY] of Boolean;
Colorarray = array [0..MAXARRAY] of Colorindex;
RGBarray = array [0..MAXARRAY] of RGBvalue;
Objarray = array [0..127] of Object;
Fntchrarray = array [0..127] of Fontchar;
Fontraster = array [0..MAXRASTER] of Short;
lbuffer = array [0..MAXOBJECTS] of Object;
Queuearray = array [0..MAXARRAY] of Short;
Curvearray = array [0..3] [0..2] of Coord;
Ibuffer = array [0..MAXARRAY] of Short;
Patcharray = array [0..3] [0..3] of Coord;

LIST OF GRAPHICS LIBRARY COMMANDS

arc - draws a circular arc

arcf - draws a filled circular arc

attachcursor - attaches the cursor to two valuators

backbuffer - enables updating in the back buffer

backface - turns on and off backfacing polygon removal

bbox2 - specifies bounding box and minimum pixel radius for drawing commands

blankscreen - turns off screen refresh

blink - changes the color map entry at a selectable rate

blkqread - reads multiple entries from the queue

callfunc - calls a function from within an object

callobj - draws an instance of an object

capture, rcapture - dumps screen images to file or hard copy device

charstr - draws a string of raster characters on the screen

chunksize - specifies minimum object size in memory

circ - outlines a circular region

circf - draws a filled circle

clear - clears the viewport

clearhitcode - sets the system hitcode to zero

clkoff - turns off the keyboard click

clkon - turns on the keyboard click

closeobj - closes an object

cmov - changes the current character position

color - sets the color attribute

compactify - compacts the memory storage of an object

crv - draws a curve

crvn - draws a series of curves segments

curorigin - sets the origin of a cursor

cursoff - turns the cursor off

curson - turns the cursor on

curvebasis - sets the basis matrix used in drawing curves

curveit - draws a curve segment

curveprecision - sets the number of line segments comprising a curve segment

cyclemap - cycles through color maps at a selected rate

dbtext - sets the dial and switch box text

defbasis - defines a basis matrix

defcursor - defines a cursor glyph

deflinestyle - defines a linestyle

defpattern - defines a texture pattern

defrasterfont - defines a raster font

delobj - deletes an object

deltag - deletes tags from objects

depthcue - turns on and off depth-cue mode

doublebuffer - sets the display mode to double buffer mode

draw - draws a line

editobj - opens an object for editing

endfeedback - turns off feedback mode

endpick - turns off picking mode

endselect - turns off selecting mode

feedback - turns on feedback mode

finish - waits until the terminal command queue and Geometry Pipeline are empty

font - selects a raster font for drawing text strings

foreground - requests that a process not be put in the background by getport while using the window manager

frontbuffer - enables updating in the front buffer

fudge - specifies fudge values to be added to a graphics port when it is resized

gbegin - initializes the IRIS without altering the color map

gconfig - reconfigures the IRIS

genobj - returns a unique integer for use as an object name

gentag - returns a unique integer for use as a tag

getbuffer - indicates which buffers are enabled for writing

getbutton - gets the state (up/down) of a button

getcmmode - returns the current color map mode

getcolor - returns the current color

getcpos - returns the current character position

getcursor - returns the cursor characteristics

getdcm - indicates whether depth-cue mode is on or off

getdepth - returns the parameters of setdepth

getdisplaymode - returns the current display mode

getfont - returns the current raster font number

getgpos - returns the current graphics position

getheight - returns the maximum height of the characters in the current raster font

gethitcode - returns the current system hitcode

getlsbackup - returns the status of the linestyle backup mode

getlsrepeat - returns the linestyle repeat count

getlstyle - returns the current linestyle

getlwidth - returns the current linewidth

getmap - returns the number of the currently selected color map

getmatrix - returns the current transformation matrix

getmcolor - returns a color map entry

getmem - returns amount of available memory

getmonitor - returns the display monitor mode

getopenobj - indicates if an object is currently open for editing

getorigin - returns the position of a graphics port in the window manager

getpattern - returns the index of the currently selected pattern

getplanes - returns the number of available bitplanes

getport - creates a graphics port in the window manager

getresetls - returns the status of resetls

gRGBcolor - returns the current RGB value

gRGBcursor - returns the characteristics of the cursor in RGB mode

gRGBmask - returns the current RGB writemask

getscrmask - returns the current screenmask

getsize - returns the size of a graphics port in the window manager

gettp - returns the location of the current textport

getvaluator - returns the current state of a valuator

getviewport - returns the current viewport

getwritemask - returns the current writemask

getzbuffer - indicates whether z-buffering is on or off

gexit - terminates an IRIS program

gflush - forces all unsent commands down the network to the Geometry Pipeline

ginit - initializes the IRIS

greset - resets all global attributes to their initial values

gsync -  waits for a vertical retrace period

imakebackground - makes a process in charge of drawing the background of the window manager screen

initnames - initializes the name stack

isobj - indicates whether a given object name identifies an object

istag - indicates whether a given tag is in use within the currently open object

keepaspect - specifies the aspect ratio of a graphics port

lampoff - turns off display lights on the keyboard

lampon - turns on display lights on the keyboard

linewidth - specifies the linewidth

loadmatrix - loads a transformation matrix

loadname - replaces the name on the top of the name stack

lookat - defines a viewing transformation

lsbackup - controls whether the last two pixels of a line are colored

lsrepeat - sets repeat factor for linestyle

makeobj - creates an object

maketag - names the command in the display list

mapcolor - changes a color map entry

mapw - maps a point on the screen into a line in 3D world coordinates

mapw2 - maps a point on the screen into 2D world coordinates

maxsize - specifies a maximum size for a graphics port in the window manager

minsize - specifies a minimum size for a graphics port in the window manager

move - moves to a specified point

multimap - utilizes the color map as sixteen small maps

multmatrix - pre-multiplies the current transformation matrix

newtag - creates a new tag in an object

noise - filters valuator motion

noport - specifies that a program does not require a graphics port

objdelete - deletes commands from an object

objinsert - inserts commands in an object at the chosen location

objreplace - overwrites existing display list commands with new ones

onemap - organizes the color map as one large map

ortho - defines an orthographic projection transformation

pagecolor - sets the color of the textport background

pagewritemask - sets the writemask for the textport background

passthrough - passes a single token through the Geometry Pipeline

patch - draws a surface patch

patchbasis - sets current basis matrices

patchcurves - sets number of curves used to represent a patch

patchprecision - sets precision at which curves are drawn

pclos - polygon close

pdr - polygon draw

perspective - defines a perspective projection transformation

pick - puts the system in picking mode

picksize - sets the dimensions of the picking window

pmv - polygon move

pnt - draws a point

polarview - defines the viewer’s position in polar coordinates

polf - draws a filled polygon

poly - outlines a polygon

popattributes - pops the attribute stack

popmatrix - pops the transformation matrix stack

popname -  pops a name off the name stack

popviewport - restores the viewport, screenmask, and setdepth parameters

prefposition - specifies the preferred location and size of a graphics port

prefsize - specifies the preferred size of a graphics port in the window manager

pushattributes - pushes attributes on a stack

pushmatrix - pushes down the transformation matrix stack

pushname - pushes a new name on the name stack

pushviewport - save the current viewport, screenmask, and setdepth parameters

qdevice - queues a device (keyboard, button, or valuator)

qenter - creates an event queue entry

qread - reads the first entry in the event queue

qreset - empties the event queue

qtest - checks the contents of the event queue

rdr - relative draw

readRGB - returns values of specific pixels

readpixels - returns values of specific pixels

rect - outlines a rectangular region

rectcopy - copies a rectangle of pixels on the IRIS screen

rectf - fills a rectangular area

resetls - controls the continuity of linestyles

reshapeviewport - sets the viewport to the current dimensions of the graphics port in the window manager

RGBcolor - sets the current color in RGB mode

RGBcursor - sets the characteristics of the cursor in RGB mode

RGBmode - sets a display mode that bypasses the color map

RGBwritemask - grants write access to a subset of the available bitplanes

ringbell - rings the keyboard bell

rmv - relative move

rotate - rotates graphical primitives

rpdr - relative polygon draw

rpmv - relative polygon move

scale - scales and mirrors objects

screenspace - puts a program in screen space under the window manager

scrmask - defines a clipping mask for the screen

select - puts the IRIS in selecting mode

setbell - sets the duration of the keyboard bell

setcursor - sets the cursor characteristics

setdblights - sets the lights on the dial and button box

setdepth - sets up a 3D viewport

setlinestyle - selects a linestyle

setmap - chooses one of the sixteen small color maps

setmonitor - sets the monitor type

setpattern - selects a texture pattern for filling polygons, rectangles, and curves

setshade - sets the current polygon shade

setvaluator - assigns an initial value to a valuator

shaderange - sets range of color indices

singlebuffer - writes and displays all the bitplanes

spclos - draws currently open polygon

splf - draws a shaded filled polygon

stepunit - specifies that a graphics port should change size in discrete steps

strwidth - returns the width of the specified text string

swapbuffers - swaps the front and back buffers in double buffer mode

swapinterval - defines a minimum time between buffer swaps

textcolor - sets the color of text drawn in the textport

textinit - initializes the textport

textport - allocates an area of the screen for the textport

textwritemask - grants write permission for the textport

tie - ties two valuators to a button

tpoff - turns off the textport

tpon - turns on textport

translate - translates graphical primitives

unqdevice - unqueues a device from the event queue

viewport - allocates an area of the screen for an image

window - defines a perspective projection transformation

writeRGB - paints a row of pixels on the screen

writemask - grants write permission to available bitplanes

writepixels - paints a row of pixels on the screen

xfpt - transforms points

zbuffer - starts or ends z-buffer operation

zclear - initializes the z-buffer to largest possible integer

Version 2.5  —  April 22, 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026