blob: 35487a74fab4ea784e4f3b72bc764ba373a92139 [file] [log] [blame]
Guido van Rossumc6360141990-10-13 19:23:40 +00001# Constants defined in <gl.h>
2
3#**************************************************************************
4#* *
5#* Copyright (C) 1984, Silicon Graphics, Inc. *
6#* *
7#* These coded instructions, statements, and computer programs contain *
8#* unpublished proprietary information of Silicon Graphics, Inc., and *
9#* are protected by Federal copyright law. They may not be disclosed *
10#* to third parties or copied or duplicated in any form, in whole or *
11#* in part, without the prior written consent of Silicon Graphics, Inc. *
12#* *
13#**************************************************************************
14
15# Graphics Libary constants
16
17# Booleans
18TRUE = 1
19FALSE = 0
20
21# maximum X and Y screen coordinates
22XMAXSCREEN = 1279
23YMAXSCREEN = 1023
24XMAXMEDIUM = 1023 # max for medium res monitor
25YMAXMEDIUM = 767
26XMAX170 = 645 # max for RS-170
27YMAX170 = 484
28XMAXPAL = 779 # max for PAL
29YMAXPAL = 574
30
31# various hardware/software limits
32ATTRIBSTACKDEPTH = 10
33VPSTACKDEPTH = 8
34MATRIXSTACKDEPTH = 32
35NAMESTACKDEPTH = 1025
36STARTTAG = -2
37ENDTAG = -3
38CPOSX_INVALID = -(2*XMAXSCREEN)
39
40# names for colors in color map loaded by greset
41BLACK = 0
42RED = 1
43GREEN = 2
44YELLOW = 3
45BLUE = 4
46MAGENTA = 5
47CYAN = 6
48WHITE = 7
49
50# popup colors
51PUP_CLEAR = 0
52PUP_COLOR = 1
53PUP_BLACK = 2
54PUP_WHITE = 3
55
56# defines for drawmode
57NORMALDRAW = 0
58PUPDRAW = 1
59OVERDRAW = 2
60UNDERDRAW = 3
61CURSORDRAW = 4
62
63# defines for defpattern
64PATTERN_16 = 16
65PATTERN_32 = 32
66PATTERN_64 = 64
67
68PATTERN_16_SIZE = 16
69PATTERN_32_SIZE = 64
70PATTERN_64_SIZE = 256
71
72# defines for readsource
73SRC_AUTO = 0
74SRC_FRONT = 1
75SRC_BACK = 2
76SRC_ZBUFFER = 3
77SRC_PUP = 4
78SRC_OVER = 5
79SRC_UNDER = 6
80SRC_FRAMEGRABBER = 7
81
82# defines for blendfunction
83BF_ZERO = 0
84BF_ONE = 1
85BF_DC = 2
86BF_SC = 2
87BF_MDC = 3
88BF_MSC = 3
89BF_SA = 4
90BF_MSA = 5
91BF_DA = 6
92BF_MDA = 7
93
94# defines for zfunction
95ZF_NEVER = 0
96ZF_LESS = 1
97ZF_EQUAL = 2
98ZF_LEQUAL = 3
99ZF_GREATER = 4
100ZF_NOTEQUAL = 5
101ZF_GEQUAL = 6
102ZF_ALWAYS = 7
103
104# defines for zsource
105ZSRC_DEPTH = 0
106ZSRC_COLOR = 1
107
108# defines for pntsmooth
109SMP_OFF = 0
110SMP_ON = 1
111
112# defines for linesmooth
113SML_OFF = 0
114SML_ON = 1
115
116# defines for setpup
117PUP_NONE = 0
118PUP_GREY = 1
119
120# defines for glcompat
121GLC_OLDPOLYGON = 0
122GLC_ZRANGEMAP = 1
123
124# defines for curstype
125C16X1 = 0
126C16X2 = 1
127C32X1 = 2
128C32X2 = 3
129CCROSS = 4
130
131# defines for shademodel
132FLAT = 0
133GOURAUD = 1
134
135# defines for logicop
136### LO_ZERO = 0x0
137### LO_AND = 0x1
138### LO_ANDR = 0x2
139### LO_SRC = 0x3
140### LO_ANDI = 0x4
141### LO_DST = 0x5
142### LO_XOR = 0x6
143### LO_OR = 0x7
144### LO_NOR = 0x8
145### LO_XNOR = 0x9
146### LO_NDST = 0xa
147### LO_ORR = 0xb
148### LO_NSRC = 0xc
149### LO_ORI = 0xd
150### LO_NAND = 0xe
151### LO_ONE = 0xf
152
153
154#
155# START defines for getgdesc
156#
157
158GD_XPMAX = 0
159GD_YPMAX = 1
160GD_XMMAX = 2
161GD_YMMAX = 3
162GD_ZMIN = 4
163GD_ZMAX = 5
164GD_BITS_NORM_SNG_RED = 6
165GD_BITS_NORM_SNG_GREEN = 7
166GD_BITS_NORM_SNG_BLUE = 8
167GD_BITS_NORM_DBL_RED = 9
168GD_BITS_NORM_DBL_GREEN = 10
169GD_BITS_NORM_DBL_BLUE = 11
170GD_BITS_NORM_SNG_CMODE = 12
171GD_BITS_NORM_DBL_CMODE = 13
172GD_BITS_NORM_SNG_MMAP = 14
173GD_BITS_NORM_DBL_MMAP = 15
174GD_BITS_NORM_ZBUFFER = 16
175GD_BITS_OVER_SNG_CMODE = 17
176GD_BITS_UNDR_SNG_CMODE = 18
177GD_BITS_PUP_SNG_CMODE = 19
178GD_BITS_NORM_SNG_ALPHA = 21
179GD_BITS_NORM_DBL_ALPHA = 22
180GD_BITS_CURSOR = 23
181GD_OVERUNDER_SHARED = 24
182GD_BLEND = 25
183GD_CIFRACT = 26
184GD_CROSSHAIR_CINDEX = 27
185GD_DITHER = 28
186GD_LINESMOOTH_CMODE = 30
187GD_LINESMOOTH_RGB = 31
188GD_LOGICOP = 33
189GD_NSCRNS = 35
190GD_NURBS_ORDER = 36
191GD_NBLINKS = 37
192GD_NVERTEX_POLY = 39
193GD_PATSIZE_64 = 40
194GD_PNTSMOOTH_CMODE = 41
195GD_PNTSMOOTH_RGB = 42
196GD_PUP_TO_OVERUNDER = 43
197GD_READSOURCE = 44
198GD_READSOURCE_ZBUFFER = 48
199GD_STEREO = 50
200GD_SUBPIXEL_LINE = 51
201GD_SUBPIXEL_PNT = 52
202GD_SUBPIXEL_POLY = 53
203GD_TRIMCURVE_ORDER = 54
204GD_WSYS = 55
205GD_ZDRAW_GEOM = 57
206GD_ZDRAW_PIXELS = 58
207GD_SCRNTYPE = 61
208GD_TEXTPORT = 62
209GD_NMMAPS = 63
210GD_FRAMEGRABBER = 64
211GD_TIMERHZ = 66
212GD_DBBOX = 67
213GD_AFUNCTION = 68
214GD_ALPHA_OVERUNDER = 69
215GD_BITS_ACBUF = 70
216GD_BITS_ACBUF_HW = 71
217GD_BITS_STENCIL = 72
218GD_CLIPPLANES = 73
219GD_FOGVERTEX = 74
220GD_LIGHTING_TWOSIDE = 76
221GD_POLYMODE = 77
222GD_POLYSMOOTH = 78
223GD_SCRBOX = 79
224GD_TEXTURE = 80
225
226# return value for inquiries when there is no limit
227GD_NOLIMIT = 2
228
229# return values for GD_WSYS
230GD_WSYS_NONE = 0
231GD_WSYS_4S = 1
232
233# return values for GD_SCRNTYPE
234GD_SCRNTYPE_WM = 0
235GD_SCRNTYPE_NOWM = 1
236
237#
238# END defines for getgdesc
239#
240
241
242#
243# START NURBS interface definitions
244#
245
246# NURBS Rendering Properties
247N_PIXEL_TOLERANCE = 1
248N_CULLING = 2
249N_DISPLAY = 3
250N_ERRORCHECKING = 4
251N_SUBDIVISIONS = 5
252N_S_STEPS = 6
253N_T_STEPS = 7
254N_TILES = 8
255
256N_SHADED = 1.0
257
258# ---------------------------------------------------------------------------
259# FLAGS FOR NURBS SURFACES AND CURVES
260#
261# Bit: 9876 5432 1 0
262# |tttt|nnnn|f|r| : r - 1 bit = 1 if rational coordinate exists
263# : f - 1 bit = 1 if rational coordinate is before rest
264# : = 0 if rational coordinate is after rest
265# : nnnn - 4 bits for number of coordinates
266# : tttt - 4 bits for type of data (color, position, etc.)
267#
268# NURBS data type
269# N_T_ST 0 parametric space data
270# N_T_XYZ 1 model space data
271#
272# rational or non-rational data and position in memory
273# N_NONRATIONAL 0 non-rational data
274# N_RATAFTER 1 rational data with rat coord after rest
275# N_RATBEFORE 3 rational data with rat coord before rest
276#
277# N_MKFLAG(a,b,c) ((a<<6) | (b<<2) | c)
278#
279# ---------------------------------------------------------------------------
280#
281N_ST = 0x8 # N_MKFLAG( N_T_ST, 2, N_NONRATIONAL )
282N_STW = 0xd # N_MKFLAG( N_T_ST, 3, N_RATAFTER )
283N_WST = 0xf # N_MKFLAG( N_T_ST, 3, N_RATBEFORE )
284N_XYZ = 0x4c # N_MKFLAG( N_T_XYZ, 3, N_NONRATIONAL )
285N_XYZW = 0x51 # N_MKFLAG( N_T_XYZ, 4, N_RATAFTER )
286N_WXYZ = 0x53 # N_MKFLAG( N_T_XYZ, 4, N_RATBEFORE )
287
288#
289# END NURBS interface definitions
290#
291
292
293#
294# START lighting model defines
295#
296
297LMNULL = 0.0
298
299# MATRIX modes
300MSINGLE = 0
301MPROJECTION = 1
302MVIEWING = 2
303
304# LIGHT constants
305MAXLIGHTS = 8
306MAXRESTRICTIONS = 4
307
308# MATERIAL properties
309DEFMATERIAL = 0
310EMISSION = 1
311AMBIENT = 2
312DIFFUSE = 3
313SPECULAR = 4
314SHININESS = 5
315COLORINDEXES = 6
316ALPHA = 7
317
318# LIGHT properties
319DEFLIGHT = 100
320LCOLOR = 101
321POSITION = 102
322
323# LIGHTINGMODEL properties
324DEFLMODEL = 200
325LOCALVIEWER = 201
326ATTENUATION = 202
327
328# TARGET constants
329MATERIAL = 1000
330LIGHT0 = 1100
331LIGHT1 = 1101
332LIGHT2 = 1102
333LIGHT3 = 1103
334LIGHT4 = 1104
335LIGHT5 = 1105
336LIGHT6 = 1106
337LIGHT7 = 1107
338LMODEL = 1200
339
340# lmcolor modes
341LMC_COLOR = 0
342LMC_EMISSION = 1
343LMC_AMBIENT = 2
344LMC_DIFFUSE = 3
345LMC_SPECULAR = 4
346LMC_AD = 5
347LMC_NULL = 6
348
349#
350# END lighting model defines
351#
352
353
354#
355# START distributed graphics library defines
356#
357
358DGLSINK = 0 # sink connection
359DGLLOCAL = 1 # local connection
360DGLTSOCKET = 2 # tcp socket connection
361DGL4DDN = 3 # 4DDN (DECnet)
362
363#
364# END distributed graphics library defines
365#